function unregister() {
    if (eventHandler === null) {
      return;
    }
    window.removeEventListener(eventType, eventHandler);
    eventHandler = null;
  }
Unregisters an EventListener if it has been registered.
@returns {void}