title: using $match in mongodb aggregation
body: <p>I have a variable in my Node function.</p>
  
  <pre><code>var storeId;
  </code></pre>
  
  <p>The value of <code>storeId</code> may or may not be  <code>undefined</code>. </p>
  
  <p>Now, if it is <code>undefined</code>, I do not want <code>$match</code> to filter out based on this parameter . If storeId has a value, <code>$match</code> should filter out based on <code>storeId</code>. </p>
  
  <pre><code>$match: {
         type: "abc",
        "_store._id":storeId?: //something like if else here 
      }
  </code></pre>
  
  <p>What should I add here ?</p>