Added type validations