JuMP User-Defined Function, Value and Gradient At Once

I think that check is almost always negligible. We do it by default every time f(x), g(x) or h(x) is called in Optim for example.