How to judge if an object is a function/method, class, or is simply callable