how to tell if xml element is present vs empty

I need to read a bit of XML and determine if a given xml node is present. If it is present, even if it doesnt have any children, I need to do one set of actions. If it just isnt present I need do something else. I tried testing it against invalid and checking its type() but they don’t provide a way to distinguish. The element is not listed as invalid when its not present and it’s type() is listed as roXMLList even though it doesn’t exist

How can I tell if an XML element is present or not?

If xml.NonExistentNode.Count() = 0 Then
    ' node doesn't exist
End If
If xml.NodeWithChildren.GetChildElements().Count() > 0 Then
    ' node has children
End If