Added isValid
Changed AbstractGraph constructor to include custom node names
Fixed merge conflict