GenericUI: add a sanity-check for FileChoosers