private static NodeDescriptor getNodeDescriptor(Object value) {
    if (value instanceof DefaultMutableTreeNode node && node.getUserObject() instanceof NodeDescriptor<?> nodeDescriptor) {
      return nodeDescriptor;
    }
    return null;
  }
private static NodeDescriptor getNodeDescriptor(Object value)