* @return the result of the conversion if the object can be converted, or null otherwise
*/
public Value convertObjectToXPathValue(Object object, Configuration config) throws XPathException {
if (object instanceof XmlNode) {
XmlNode node = (XmlNode)object;
DocumentWrapper dw = new DocumentWrapper(
node.get_OwnerDocument(), node.get_BaseURI(), config);
NodeWrapper nw = dw.wrap(node);
return new SingletonItem(nw);
} else if (isXdmValue(object)) {
return Value.asValue(unwrapXdmValue(object));
} else {