REF: remove unused variable and checks
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

@jbrockmendel should this be backported along with your previous PRs touching `_str_map`? I assume this one is not critical because just a small cleanup, but for avoiding conflicts if you make further changes to those methods, better to backport as well? (if so, then this is a small reminder to please include "string dtype" in your PR title to make it a bit easier to find the commits/PRs, although we should maybe start using a 2.3 milestone to keep track of this as well) This doesnt need backport, no. Thanks @jbrockmendel 