Fix error checking bug in MealScheduleFactory