Check not to add same node or edge
Check not to add same node or edge