adding type validations