@Nullable
  private static Java8MigrationUtils.MapCheckCondition tryExtract(PsiExpression fullCondition,
                                                                  @Nullable PsiStatement statement,
                                                                  boolean treatGetNullAsContainsKey) {
    PsiExpression condition = PsiUtil.skipParenthesizedExprDown(fullCondition);
    boolean negated = false;
    while (condition != null && BoolUtils.isNegation(condition)) {
      negated ^= true;
      condition = BoolUtils.getNegated(condition);
    }
    if (condition == null) return null;
    PsiReferenceExpression valueReference = null;
    boolean containsKey = false;
    PsiMethodCallExpression call;
    if (condition instanceof PsiBinaryExpression) {
      negated ^= ((PsiBinaryExpression)condition).getOperationTokenType().equals(JavaTokenType.EQEQ);
      PsiExpression value = PsiUtil.skipParenthesizedExprDown(ExpressionUtils.getValueComparedWithNull((PsiBinaryExpression)condition));
      if (value instanceof PsiReferenceExpression && statement != null) {
        valueReference = (PsiReferenceExpression)value;
        PsiElement previous = PsiTreeUtil.skipWhitespacesAndCommentsBackward(statement);
        call = tryExtractMapGetCall(valueReference, previous);
      }
      else {
        call = extractMapMethodCall(value, "get");
      }
    }
    else {
      call = extractMapMethodCall(condition, "containsKey");
      containsKey = true;
    }
    if (call == null) return null;
    PsiExpression mapExpression = call.getMethodExpression().getQualifierExpression();
    if (mapExpression == null) return null;
    PsiExpression[] args = call.getArgumentList().getExpressions();
    if (args.length != 1) return null;
    PsiExpression keyExpression = args[0];
    return new Java8MigrationUtils.MapCheckCondition(valueReference, mapExpression, keyExpression, fullCondition, negated, containsKey,
                                                     treatGetNullAsContainsKey);
  }
@Nullable
  private static Java8MigrationUtils.MapCheckCondition tryExtract(PsiExpression fullCondition,
                                                                  @Nullable PsiStatement statement,
                                                                  boolean treatGetNullAsContainsKey)