Because `AirplaneModeHelper` does not ensure the state actually gets changed when emit the event, let's check the state is valid before removing the listener.