     # Example is a URL with query that shows example invocation.
     leads: (leads) ->
         return @$leads if arguments.length is 0
-        isLeads = _.isString leads
         noLeads = "The leads is not a string"
-        throw new Error noLeads unless isLeads
+        assert _.isString(leads), noLeads
         @emit "leads", arguments...
         @$leads = leads.toString()
 

    # Outputs is a description of data returned by the method.
    outputs: (outputs) ->
        return @$outputs if arguments.length is 0
        isOutputs = _.isString outputs
        noOutputs = "The outputs is not a string"
        throw new Error noOutputs unless isOutputs
        @emit "outputs", arguments...
        @$outputs = outputs.toString()


    # Inputs is a description of the body that method expects.
    inputs: (inputs) ->
        return @$inputs if arguments.length is 0
        noInputs = "The inputs is not a string"
        assert _.isString inputs, noInputs
        @emit "inputs", arguments...
        @$inputs = inputs.toString()

