Check parameter types before checking their values.

Checking types has a side effect of coercing types for parameters, which means
that an argument spec like this:

  argument_spec = dict(
    arg = dict(type='int', choices=[1, 2, 3]))

will work with -e arg=1. Otherwise it will fail, since the argument is a string
and the choices are all ints.