Fix issue with None in parameter validation

If the value for an argument is None and the argument definition allows None
as value then the attribute must be stored without the type cast to preserve
the None value.

Fixes #4727
Merge pull request #4730 from dballesteros7/validateNone

Fix issue with None in parameter validation