boolean (PsiElement element) { final PsiElement parent = element instanceof PsiExpression ? ExpressionUtils.getPassThroughParent((PsiExpression)element) : element; if (parent instanceof PsiVariable variable) { final PsiCodeBlock codeBlock = PsiTreeUtil.getParentOfType(variable, PsiCodeBlock.class); if (codeBlock == null) { return false; } final PsiElement[] refs = DefUseUtil.getRefs(codeBlock, variable, element); return Arrays.stream(refs).anyMatch(this::isInNullableContext); } else if (parent instanceof PsiExpressionList) { final PsiElement grandParent = parent.getParent(); if (grandParent instanceof PsiMethodCallExpression methodCallExpression) { return MAP_COMPUTE.test(methodCallExpression); } } return false; }