This change smells a lot (why the hazard getter is returning an empty array? Why are you checking only the length of the first set of ground motion fields? why are you raising a warning and not an error for a so unexpected condition?).

I would investigate more about why you have got problems with your hazard input.