boolean (@NotNull PsiIdentifier label, @Nullable PsiLoopStatement stmt) { if (stmt == null) { return false; } if (stmt.getParent() instanceof PsiLabeledStatement labeledStatement) { return labeledStatement.getLabelIdentifier() == label; } return false; }