boolean (@Nullable PsiElement next, @NotNull final IElementType type) { if (next == null) return false; final ASTNode astNode = next.getNode(); return astNode != null && astNode.getElementType() == type; }