Add support for instance checks as well as function-stlye objects.