Some graph sanity checking