thisObject function throws error for static methods.