handle nil node and nil node.Ptr for verify

* tests ensure proper behaviour