How about `return constraints() if _.isFunction(constraints)`. Then the function would be responsible for returning truthy / falsey for this check.