Added additional assertion that graph is a hash