add support for checking existence of nodes and graphs