handle null value in date field