private static @Nullable ErrorTreeElement getElement(@Nullable Object value) {
    if (!(value instanceof DefaultMutableTreeNode)) return null;
    final Object userObject = ((DefaultMutableTreeNode)value).getUserObject();
    if (!(userObject instanceof ErrorTreeNodeDescriptor)) return null;
    return ((ErrorTreeNodeDescriptor)userObject).getElement();
  }
private static @Nullable ErrorTreeElement getElement(@Nullable Object value)