Fix case when date fields are empty.