Apply backport of HIVE-4122 - NULL timestamp handling bug fix.

Timestamp handling of NULL is incorrect- leads to duplicate values in a table where the NULL is specified.