effects: Guard against InputMethod being nullptr or not enabled
Apparently InputMethod can be nullptr, in which case we end up dereferencing nullptr when we try to get the input panel.
Apparently InputMethod can be nullptr, in which case we end up dereferencing nullptr when we try to get the input panel.