title: Check if AJAX response data is empty/blank/null/undefined/0
body: <h2>What I have:</h2>
  
  <p>I have jQuery AJAX function that returns HTML after querying a database. Depending on the result of the query, the function will either return HTML code or nothing (i.e. blank) as desired.</p>
  
  <h2>What I need:</h2>
  
  <p>I need to conditionally check for when the data is blank.</p>
  
  <h2>My code:</h2>
  
  <pre><code>$.ajax({
      type:"POST",
      url: "&lt;?php echo admin_url('admin-ajax.php'); ?&gt;",
      data: associated_buildsorprojects_form,
      success:function(data){
          if(!data){  
          //if(data="undefined"){
          //if(data==="undefined"){
          //if(data==null){
          //if(data.length == 0){
          //if ( data.length != 0 ){
          //if(data===0){
          //if(data==="0"){   
              alert("Data: " + data);
          }
      },
      error: function(errorThrown){
          alert(errorThrown);
          alert("There is an error with AJAX!");
      }               
  });
  </code></pre>
  
  <h2>My problem:</h2>
  
  <p>I've tried a variety of conditions but none correctly check the data. Based on my findings, a blank alert message does not mean data is </p>
  
  <ol>
  <li>empty</li>
  <li>non-existent</li>
  <li>equal to zero</li>
  <li>of length zero</li>
  <li>null</li>
  <li>undefined</li>
  </ol>
  
  <p>If it's none of these things, how can I therefore conditionally check for the data that yields a blank alert message?</p>