boolean (PsiPolyadicExpression polyadic, PsiExpression operand) { if (operand == null) return false; EquivalenceChecker equivalence = EquivalenceChecker.getCanonicalPsiEquivalence(); return Arrays.stream(polyadic.getOperands()).anyMatch(op -> equivalence.expressionsAreEquivalent(op, operand)); }