boolean (@NotNull PsiElement element) { if (!(element instanceof GrForStatement statement)) { return false; } final GrForClause clause = statement.getClause(); if (!(clause instanceof GrForInClause) || ((GrForInClause) clause).getIteratedExpression() == null) { return false; } return !ErrorUtil.containsError(element); }