avoid a warning by PyTypeChecker
NDFrame.to_csv(str) got a warning by PyTypeChecker, "Expected type 'None', got 'str' instead"
use typing.Union to combine type "FilePathOrBuffer[AnyStr]" and "None", instead of " | " can avoid it.
![image](https://user-images.githubusercontent.com/24448028/141879473-56355ca2-60de-4405-94a3-fdc3013cf5a7.png)

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
