More error handling for date validation.