throw error with cycles in dependency graph

As @stringertheory pointed out, we should really detect if the graph is *not* a DAG and throw an informative error message. This would be particularly helpful in conjunction with  #55