PsiExpression (PsiExpression expression, @NotNull TypeEvaluator evaluator) { final PsiElement parent = expression.getParent(); boolean isDoubleNegation = false; if (parent instanceof PsiExpression && DoubleNegationInspection.isNegation((PsiExpression)parent)) { isDoubleNegation = true; expression = (PsiExpression)parent.replace(expression); } setReplaceByString((isDoubleNegation ? "" : "!") + "$q$.findAny().isPresent()"); return super.replace(expression, evaluator); }