title: Why destructuring assignment doesn't know null value as falsy and use default value?
body: <p>Assume we have a function that use some keys in the inner object of argument:</p>
  <pre class="lang-js prettyprint-override"><code>const api = ({ data: { name } = {} }) =&gt;
    `My name is ${name}.`;
  </code></pre>
  <p>If we pass <code>{}</code>, <code>{ data: '' }</code>, <code>{ data: 0 }</code>, <code>{ data: NaN }</code> or <code>{ data: undefined }</code> to the function we will see:</p>
  <pre class="lang-js prettyprint-override"><code>'My name is undefined.'
  </code></pre>
  <p>And won't see any error, because destructuring assignment sees the <code>data</code> is falsy and use <code> = {}</code> instead then the <code>name</code> will be <code>undefined</code>.</p>
  <p><strong>Question</strong>: <em>Why destructuring assignment return error when we pass <code>null</code> to data key?</em></p>
  <pre class="lang-js prettyprint-override"><code>api({ data: null });
  
  // ==&gt; Uncaught TypeError: Cannot destructure property 'name' of '{}' as it is null.
  </code></pre>