add test for skipping validations when value is null and allowNull is true

A test for one of the features added in #601 (from my patch implementing the same feature).