Correct invalid date exception handling.