Add Graph.contains methods