public static boolean canConvertToLambdaWithoutSideEffects(PsiMethodReferenceExpression methodReferenceExpression) {
    if (!canConvertToLambda(methodReferenceExpression)) return false;
    final PsiExpression qualifierExpression = PsiUtil.skipParenthesizedExprDown(methodReferenceExpression.getQualifierExpression());
    return qualifierExpression == null ||
           !SideEffectChecker.mayHaveSideEffects(qualifierExpression) && !ExpressionUtils.isNewObject(qualifierExpression);
  }
public static boolean canConvertToLambdaWithoutSideEffects(PsiMethodReferenceExpression methodReferenceExpression)