@Contract("null, _, _ -> true")
  public static <T extends PsiElement> boolean processElements(@Nullable PsiElement element,
                                                               @NotNull Class<T> elementClass,
                                                               @NotNull PsiElementProcessor<? super T> processor) {
    return element == null || processElements(element, e -> {
      T t = ObjectUtils.tryCast(e, elementClass);
      return t == null || processor.execute(t);
    });
  }
@Contract("null, _, _ -> true")
  public static <T extends PsiElement> boolean processElements(@Nullable PsiElement element,
                                                               @NotNull Class<T> elementClass,
                                                               @NotNull PsiElementProcessor<? super T> processor)