[refactor] extract out a few constants
[refactor] Rewrite _validateParams (again), simplify and remove early return