InputBox and Chooser should restrict type rather than use AnyRef