Handle invalid date cases