code: public void removeEventHandler(EventType<PreferencesFxEvent> eventType,
                                   EventHandler<? super PreferencesFxEvent> eventHandler) {
      if (eventType == null) {
        throw new NullPointerException("Argument eventType must not be null");
      }
      if (eventHandler == null) {
        throw new NullPointerException("Argument eventHandler must not be null");
      }
  
      List<EventHandler<? super PreferencesFxEvent>> list = this.eventHandlers.get(eventType);
      if (list != null) {
        list.remove(eventHandler);
      }
    }
docs: Unregisters a previously registered event handler. One handler might have been registered for
  different event types, so the caller needs to specify the particular event type from which to
  unregister the handler.
  
  @param eventType the event type from which to unregister
  @param eventHandler the handler to unregister
  @throws NullPointerException if the event type or handler is null