Handle invalid date