Added some validation for parameters in the various models