These errors are quite normal due to the upgrade. Usually they happen because the variable expects to hold an array and it ends up holding a null value.
Probably you might want to first check if the variable is an array and then perform the actual action. E.G.:
if (is_array($variable) && count($variable) > 2) { ...