Add validation handling for invalid date