Try to handle case where the date is invalid