Fix bug when date type value is null.