Validate query parameter input.

Check API query parameter values to make sure they make sense, and return 400
if they don't.