remove method Null safety

Node remove()

Implementation

Node remove() {
  // TODO(jmesserly): is parent == null an error?
  parentNode?.nodes.remove(this);
  return this;
}