BUG: Better handling of invalid na_option argument for groupby.rank
- [x] closes #22124
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff
- [x] whatsnew entry

This is also related to #19499