added some conversion checks to enums and datetimes