Fix so that it is really possible to pass null to disable transformation in validators

In documentation it is written that you can pass `null` to disable transformation for validators, but this does not really work. This pull request fixes that.