@Override
    public boolean isValid() {
      TreeElement value = getValue();
      return !(value instanceof PsiTreeElementBase<?> treeElementBase) || treeElementBase.isValid();
    }
@Override
    public boolean isValid()