Use inspect.isclass() to determine when wrapper is being passed a class for wrapped or instance.