fix the function find_common_types bug
` types[0]` can raise a KeyError when `types` is a `pd.Series` . see issue #25270

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
