Moved type check from DateParse to main file