find out if the graph is directed or not