Handle empty input as NULL.
Use isEnsureDate to make sure the value is used as a DATE not a String.