check if osk exists before toggling it on or off