Use == rather than is for string comparison.

It may be a regression, but a is a is failing on Jython 2.7b2
and perhaps object equality is more sensible than object identify
here anyway. I am assuming only basic objects will be used as keys
in the graph object.

See also http://bugs.jython.org/issue2137