code: public HandlerRegistration addStorageChangeHandler(final StorageChangeEvent.Handler handler) {
      if(handler == null)
        throw new IllegalArgumentException("Handler can not be null");
      ensureHandlerSet().add(handler);
      return new HandlerRegistration() {
        @Override
        public void removeHandler() {
          if (handlers != null) {
            handlers.remove(handler);
            if (handlers.isEmpty()) {
              handlers = null;
            }
          }
        }
      };
    }
docs: Registers an event handler for {@link StorageChangeEvent}
  
  @param handler an event handler instance
  @return {@link HandlerRegistration} used to remove this handler