addVertex(value) {
    if (this.nodes.has(value)) { // <1>
      return this.nodes.get(value);
    }
    const vertex = new Node(value); // <2>
    this.nodes.set(value, vertex); // <3>
    return vertex;
  }
Add a node to the graph.
Runtime: O(1)
@param {any} value node's value
@returns {Node} the new node or the existing one if it already exits.