More assertions in graph implementation.