title: Array.find() gives error "TypeError: theArray.find(...) is undefined"
body: <p>I'm getting <code>TypeError: theArray.find(...) is undefined</code> from a code that is in essence similar to this:</p>
  <pre><code>if (!Array.isArray(theArray)) console.error(&quot;WARNING! theArray is not an array: &quot;, theArray);
  console.log(theArray.find((element) =&gt; element).someProperty);
  </code></pre>
  <p>I'm not getting the error message <em>WARNING! theArray is not an array</em>, but I'm getting the error <em>theArray.find(...) is undefined</em></p>
  <p>The error message does not say that <em>theArray</em> is undefined, this is an error message that I would except when theArray is not of type array.</p>
  <p>Inside the array function there would be a more complex logic, but I simlified it to focus on the Array.find() problem.
  The variable <code>theArray</code> is an array of complex objects, with a lot of properties.</p>