private static boolean isOfType(@Nullable PsiElement psi, IElementType @NotNull ... types) {
    if (psi == null) return false;
    IElementType actual = psi.getNode().getElementType();
    return ContainerUtil.exists(types, actual::equals);
  }
private static boolean isOfType(@Nullable PsiElement psi, IElementType @NotNull ... types)