Add filter_choices helper function.