title: Javascript: How to test if response JSON array is empty
body: <p>I'm getting back the following JSON:</p>
  
  <pre><code>{"array":[],"object":null,"bool":false}
  </code></pre>
  
  <p>And I'm testing it with the following, seemingly exhaustive, if statement:</p>
  
  <pre><code>$.ajax({
          type: "GET",
          url: "/ajax/rest/siteService/list",
          dataType: "json",
          success: function (response) {
              var siteArray = response.array;
  
              // Handle the case where the user may not belong to any groups
              if (siteArray === null || siteArray=== undefined || siteArray=== '' || siteArray.length === 0) {
                              window.alert('hi');
              }
         }
  });
  </code></pre>
  
  <p>But the alert is not firing.  :[</p>