title: How can I safely check is node empty or not? (Symfony 2 Crawler)
body: <p>When I try to take some nonexistent content from page I catch this error:</p>
  
  <pre><code>The current node list is empty.
  500 Internal Server Error - InvalidArgumentException 
  </code></pre>
  
  <p>How can I safely check exists this content or not? Here some examples that does not work:</p>
  
  <pre><code>if($crawler-&gt;filter('.PropertyBody')-&gt;eq(2)-&gt;text()){
      // bla bla
  }
  
  if(!empty($crawler-&gt;filter('.PropertyBody')-&gt;eq(2)-&gt;text())){
      // bla bla
  }
  if(($crawler-&gt;filter('.PropertyBody')-&gt;eq(2)-&gt;text()) != null){
      // bla bla
  }
  </code></pre>
  
  <p>THANKS, I helped myself with:</p>
  
  <pre><code>$count = $crawler-&gt;filter('.PropertyBody')-&gt;count();
  if($count &gt; 2){
      $marks = $crawler-&gt;filter('.PropertyBody')-&gt;eq(2)-&gt;text();
  }
  </code></pre>