Some manual cleanup around the areas of code where CRM_Utils_Array::value is used for a number defaulting to 0