private static Object getElement(Object node) {
    NodeDescriptor<?> descriptor = getNodeDescriptor(node);
    return descriptor == null ? null : descriptor.getElement();
  }
private static Object getElement(Object node)