title: Try not to have a null or undefined value in a JSON to use Object.keys function
body: <p>I have a JSON which looks like :  </p>
  
  <pre><code>{
  'total_count': 6,
  'incomplete_results': false,
  'items': [
    {
      'url': 'https://api.github.com/repos/Samhot/GenIHM/issues/2',
      'repository_url': 'https://api.github.com/repos/Samhot/GenIHM',
      'comments_url': 'https://api.github.com/repos/Samhot/GenIHM/issues/2/comments',
      'events_url': 'https://api.github.com/repos/Samhot/GenIHM/issues/2/events',
      'html_url': 'https://github.com/Samhot/GenIHM/issues/2',
      'id': 293234257,
      'number': 2,
      'title': 'Créer serveur pour API RESTful',
      'user': {
        'login': 'Samhot',
        'id': 7148311,
        'avatar_url': 'https://avatars3.githubusercontent.com/u/7148311?v=4',
        'gravatar_id': '',
        'url': 'https://api.github.com/users/Samhot',
        'html_url': 'https://github.com/Samhot',
        'followers_url': 'https://api.github.com/users/Samhot/followers',
        'subscriptions_url': 'https://api.github.com/users/Samhot/subscriptions',
        'organizations_url': 'https://api.github.com/users/Samhot/orgs',
        'repos_url': 'https://api.github.com/users/Samhot/repos',
        'received_events_url': 'https://api.github.com/users/Samhot/received_events',
        'type': 'User',
        'site_admin': false
      },
      'state': 'open',
      'locked': false,
      'assignee': null,
    }
   ]
  };
  </code></pre>
  
  <p>I try to get all the keys from this JSON with the <code>getDeepKeys()</code> function :</p>
  
  <pre><code>getDeepKeys2(obj) {
    const keys = Object.keys(obj);
    const childKeys = keys
      .map(key =&gt; obj[key])
      .map(
        value =&gt;
          Array.isArray(value)
            ? this.getDeepKeys2(value[0]) : typeof value === 'object'
              ? this.getDeepKeys2(value) : []
      )
      .reduce((acc, keys) =&gt; [...acc, ...keys], []);
    this.dispotest = [...keys, ...childKeys];
    return this.dispotest;
  }
  </code></pre>
  
  <p><strong>This function works perfectly as long as the JSON doesn't contain a <em>null</em> or <em>undefined</em> value like <code>'assignee': null</code>.</strong></p>
  
  <p>If this type of value is present in my JSON the function returns :  </p>
  
  <blockquote>
    <p>ERROR TypeError: Cannot convert undefined or null to object</p>
  </blockquote>
  
  <p>I think to use the <strong><code>typeof</code></strong> function to do <code>if (typeof value === null { return null; }</code> but i don't know where i have to apply this...</p>
  
  <p>Thanks for help !</p>