else if (o == null) { throw new NotWrappableTypeException("Can't wrap null/None"); }
    public PyObject instrumentObject(Test test,                                     PyDispatcher pyDispatcher,                                     Object o)      throws NotWrappableTypeException {      if (o instanceof PyObject) {        // Jython object.        if (o instanceof PyInstance) {          final PyInstance pyInstance = (PyInstance)o;          final PyClass pyClass =            m_versionAdapter.getClassForInstance(pyInstance);          return new InstrumentedPyInstance(            this, test, pyDispatcher, pyClass, pyInstance);        }        else if (o instanceof PyFunction) {          return new InstrumentedPyJavaInstanceForPyMethodsAndPyFunctions(            test, pyDispatcher, (PyFunction)o);        }        else if (o instanceof PyMethod) {          return instrumentPyMethod(test, pyDispatcher, (PyMethod)o);        }        else if (o instanceof PyReflectedFunction) {          return new InstrumentedPyReflectedFunction(            test, pyDispatcher, (PyReflectedFunction)o);        }      }      else if (o instanceof PyProxy) {        // Jython object that extends a Java class.        final PyInstance pyInstance = ((PyProxy)o)._getPyInstance();        final PyClass pyClass =          m_versionAdapter.getClassForInstance(pyInstance);        return new InstrumentedPyInstance(          this, test, pyDispatcher, pyClass, pyInstance);      }      else {        // Java object.        final Class c = o.getClass();        // NB Jython uses Java types for some primitives and strings.        if (!c.isArray() &&            !(o instanceof Number) &&            !(o instanceof String)) {          return new InstrumentedPyJavaInstanceForJavaInstances(            this, test, pyDispatcher, o);        }      }      throw new NotWrappableTypeException(o.getClass().getName());    }