Fix: Toggle does not work once IME disabled and focus re-enters

Fixes issue 182
Check null inputmethodId earlier