Add parameter validation to give appropriate named errors