To parse the HTML using C#, I'm using the HTML Agility Pack.
HtmlNodeCollection hNodes = myHtmDoc.DocumentNode.SelectNodes("//h1");
I am iterating over these hNodes. And sometimes it could be null. How to determine whether or not hNodes is null. IsNullOrEmpty can be used for strings. Like that, is there anything here that can be checked for null? I want the outcome to
If (hNodes != null) DoSomething
Your code is flawless since you checked the member's nullability in that phrase.