title: Checking if datatable is empty
body: <p>I try to build a table which is both a JQuery treeTable and a JQuery datatable at the same time.
  Attention please, my problem is not about how to use it both, i can view without problem if i fill the "table". </p>
  
  <p>But when i send an empty array to my treetable building code, i am getting error.</p>
  
  <p>Here are problem lines:</p>
  
  <pre><code>$('#table tbody tr').each(function(){
                          console.log(this);
                          if(mytable.fnGetData(mytable.fnGetPosition(this))[4]){
                              console.log('in set child before');
                              $(this).addClass('child-of-'+mytable.fnGetData(mytable.fnGetPosition(this))[4]);
                              console.log('in set child after');
                          }
                          $(this).attr('id', mytable.fnGetData(mytable.fnGetPosition(this))[0]);
                      });
  </code></pre>
  
  <p>When i do not populate the table, despite my wish, the process goes through to the above loop, and</p>
  
  <p><code>console.log(this)</code> prints out:</p>
  
  <pre><code>&lt;tr class="odd"&gt;&lt;td valign="top" colspan="4" class="dataTables_empty"&gt;No data available in table&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>So it generates error, because the row data is not an expected one.</p>
  
  <p>I want to ask, what is the most elegant way to control if it is a populated "data", or an empty warning row? Is checking the "class" for "dataTables_empty" an appropriate method?</p>
  
  <p>Or is there any other way to not to go through above loop if table is empty.</p>