Added a validator for validating functions based on what arguments they take