Correctly handle booleans, null and empty strings in the Validator (see #6287)