If you use an AttributeDefinition for this param and call AD.validateOperation(operation).asString() you'll get a consistent error message if it's missing or invalid. You create the AD anyway in registerOperationHandler so might as well use it.