Move type validation to TypeValidation class