Improve DateTime validation on deserialization

sounds as duplicated code