Validation of required/optional parameters when calling a method