title: check for never[] in typescript
body: <p>I have a react-component that should list the images that user is uploading.
  When user has not.</p>
  <pre><code>const [imageList, setImageList] = useState([]); 
  const BlaLabel = () =&gt; (!imageList || imageList.length === 0) ? &quot;No image loaded&quot; : &quot;Image(s) loaded&quot;;
  return(&lt;&gt;...&lt;BlaLabel/&gt;...&lt;/&gt;)
  </code></pre>
  <p>this does not work, the text &quot;Image(s) loaded&quot; is displayed before user has done anything. Some observations:</p>
  <ul>
  <li>typeof(imageList) is 'object'</li>
  <li>the typescript-type of imageList is'never[]'</li>
  <li>JSON.stringify(imageList) is '[]'.</li>
  </ul>
  <p>If I add</p>
  <pre><code>|| imageList === [] 
  </code></pre>
  <p>to the condition it all works fine and dandy. But my problem is that I don't really understand...</p>
  <p>Is <strong>never[]</strong> an object which stringifies to '[]'. Is this yet another check I need to do to 'null' and 'undefined'? What is the difference between  <strong>a === []</strong> and <strong>a.length === 0</strong>. When googling this, it doesnt seems to be a big problem for anyone, so hopefully Im mistunderstanding somehting.</p>
  <p>In short. How do I correctly check is imageList (above) is not set</p>