Fix AttributeError at line 1102

An AttributeError: 'NoneType' object has no attribute 'clear' was being thrown on line 1102 when switching from ibus-anthy to a different input source.
The error is now prevented via checking if Engine.__input_mode_icon is not null before calling __input_mode_icon.clear().