I was not sure of type either, but using isinstance was a problem for inheritance as DiGraph is a subclass of Graph. 
I think that it is a very good idea to use is_directed