Change variable detection method.

If Quaduples are serialized, nodes are of the type uri. Use string
representation to detect if it is a variable.