private static boolean checkStreamCall(@NotNull PsiMethodCallExpression expression,
                                         boolean mustReceiverBeStream,
                                         boolean mustResultBeStream) {
    final PsiMethod method = expression.resolveMethod();
    if (method != null && mustResultBeStream == isStreamType(expression.getType())) {
      final PsiElement methodClass = method.getParent();
      if (methodClass instanceof PsiClass) {
        if (mustReceiverBeStream && method.hasModifier(JvmModifier.STATIC)) return false;
        return mustReceiverBeStream == isStreamType((PsiClass)methodClass);
      }
    }

    return false;
  }
private static boolean checkStreamCall(@NotNull PsiMethodCallExpression expression,
                                         boolean mustReceiverBeStream,
                                         boolean mustResultBeStream)