title: How to correctly evaluate duplicate within Array? [PR]
body: <p>Let's say I have two api calls that returns a list of objects</p>
  <pre><code>const userResult1 = {1: {..} ,2: {..} 3: {..}}
  const userResult2 = {3: {..} ,4: {..} 5: {..}}
  </code></pre>
  <p>either one could return null. What I'm currently doing is:</p>
  <pre><code>if (userResult1 || userResult2 === null) {
    //false
  } else {
   
    const dataset = [
      Object.keys(userResult1 ),
      Object.keys(userResult2 ),
    ];
    const result = checkIfDuplicateExists(dataset);
    console.log(result) //true or false
  }
  </code></pre>
  <p>I did not have the if statement before which used to throw <code>Cannot convert undefined or null to object</code> but adding the if statement prevents this. Is this a good approach?</p>