add minimal error checking around model parameters