pass req to decide

This addition checks the arity of the callback to pass the req
object only when needed.