Add support for non-function callables (#2)