set invalid dates to nil after failed validation to prevent parsing error