Fix 5896

- which() is not valid for anonymous functions
- make showerror(.., ::MethodError) safer by checking for anonymous function.
  error message is not super helpful, but avoids the bizarre getfield
  backtrace.