title: MongoDB - The argument to $size must be an Array, but was of type: EOO / missing
body: <p>Trying to create a MongoDB data source with <a href="http://www.iccube.com" rel="noreferrer">icCube</a>. The idea is to return the size of an array as a new field. Something like :</p>
  
  <pre><code>$project:
  { 
   "people": 1, 
   "Count myFieldArray" : {$size : "$myFieldArray" }
  }
  </code></pre>
  
  <p>But I'm getting for some records the following error :</p>
  
  <pre><code>The argument to $size must be an Array, but was of type: EOO
  </code></pre>
  
  <p>Is there a way that size is 0 if the field is empty or not an array (getting rid of the error) ?</p>