title: Checking null for htmlnode collection using c#
body: <p>I am using html agility pack to parse the html using c#.</p>
  
  <pre><code> HtmlNodeCollection hNodes = myHtmDoc.DocumentNode.SelectNodes("//h1");
  </code></pre>
  
  <p>I am looping through this hNodes. And sometimes it may be null. So how to check whether hNodes is null or not. For string you can use IsNullOrEmpty. Like that here is there anything to check for null. I want result as</p>
  
  <pre><code>If (hNodes != null)
   DoSomething
  </code></pre>