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