private void checkTypes(@NotNull PsiMethodCallExpression expression, PsiExpression expression1, PsiExpression expression2) {
    if (expression1 == null || expression2 == null) {
      return;
    }
    final PsiType leftType = getType(expression1);
    final PsiType rightType = getType(expression2);
    if (leftType != null && rightType != null) {
      if (!checkTypes(expression.getMethodExpression(), leftType, rightType)) {
        CommonDataflow.DataflowResult dfa = CommonDataflow.getDataflowResult(expression);
        if (dfa != null) {
          Project project = getCurrentFile().getProject();
          PsiType refinedLeftType =
            leftType instanceof PsiPrimitiveType ? leftType : TypeConstraint.fromDfType(dfa.getDfType(expression1)).getPsiType(project);
          PsiType refinedRightType =
            rightType instanceof PsiPrimitiveType ? rightType : TypeConstraint.fromDfType(dfa.getDfType(expression2)).getPsiType(project);
          if (refinedLeftType != null && refinedRightType != null &&
              (!refinedLeftType.equals(leftType) || !refinedRightType.equals(rightType))) {
            checkTypes(expression.getMethodExpression(), refinedLeftType, refinedRightType);
          }
        }
      }
    }
  }
private void checkTypes(@NotNull PsiMethodCallExpression expression, PsiExpression expression1, PsiExpression expression2)