Finish addNode and addEdge

Graph creation also works with null input