Cleaned up error handling on dates.