take NULL instead of empty string if no valid DateTime object is given