Added error checking to MyGraph and added InvalidEdgeException Class