public static boolean isVetoed(PsiElement element) {
    if (element == null ||
        element instanceof SyntheticElement ||
        element instanceof PsiNamedElement namedElement && namedElement.getName() == null) {
      return true;
    }
    for(Condition<? super PsiElement> condition: VETO_RENAME_CONDITION_EP.getExtensionList()) {
      if (condition.value(element)) return true;
    }
    return false;
  }
public static boolean isVetoed(PsiElement element)