How to assert whether a node exist in some XML?

if (xml.someNonExistedNode) will always be “true”, so is there anyway to assert that some node does not exist ?

Thanks!