Coerce param types before checking

As explained in the message for the first commit, it seems to be better to first coerce module parameter types and then check their validity.

Included is a related Linode module param fix that initially led me to make this change.