fixed #23112 -- Field.get_choices tries to index an iterable

related to https://code.djangoproject.com/ticket/23112
No, but I'd replace the three lines with:
```
choices = list(self.choices) if self.choices else []
named_groups = choices and isinstance(choices[0][1], (list, tuple))
```
otherwise the PR looks good to me.