[BUGFIX] Fix illegal argument for foreach()

If no model configuration in the yaml definition is found, the
isValid() call should return the result of the GenericObjectValidator.
This fixes a fatal error on a NULL value being passed as array
to the foreach loop.