Fix so that it is really possible to pass null to disable transformation in validators.
Test for #1659
Merge branch 'pr/1659' into devel