Add function validations