TextInputMenuWidget: Handle undefined value properly when toggling visibility

I0a39ae70 exposed this issue by switching from MenuWidget to TextInputMenuWidget.
See bug 71178 comment 22

Bug: 72100
Change-Id: Ic872eff6e00c8a5c5d6cc397a87454d42898a476
Merge "TextInputMenuWidget: Handle undefined value properly when toggling visibility"