verify_inputs function

Verify the inputs to optimize_controls()