BUG: typing.get_type_hints fails on DataFrame
### 

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.

- [x] I have confirmed this bug exists on the master branch of pandas.


### Reproducible Example

```python
from typing import get_type_hints
import pandas as pd

get_type_hints(pd.DataFrame)
```


### Issue Description

The example raises the following error:
```python
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ben.fogelson/.pyenv/versions/3.9.7/lib/python3.9/typing.py", line 1437, in get_type_hints
    value = _eval_type(value, base_globals, localns)
  File "/Users/ben.fogelson/.pyenv/versions/3.9.7/lib/python3.9/typing.py", line 290, in _eval_type
    return t._evaluate(globalns, localns, recursive_guard)
  File "/Users/ben.fogelson/.pyenv/versions/3.9.7/lib/python3.9/typing.py", line 551, in _evaluate
    eval(self.__forward_code__, globalns, localns),
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'NoneType'
```

This error is still raised even if `from __future__ import annotations` is added at the beginning of the example.

### Expected Behavior

Expected to get type hints for `pd.DataFrame`.

### Installed Versions

<details>

INSTALLED VERSIONS
------------------
commit           : 73c68257545b5f8530b7044f56647bd2db92e2ba
python           : 3.9.7.final.0
python-bits      : 64
OS               : Darwin
OS-release       : 20.6.0
Version          : Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64
machine          : x86_64
processor        : i386
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 1.3.3
numpy            : 1.21.2
pytz             : 2021.3
dateutil         : 2.8.2
pip              : 21.2.4
setuptools       : 57.4.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : None
IPython          : None
pandas_datareader: None
bs4              : None
bottleneck       : None
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : None
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pyxlsb           : None
s3fs             : None
scipy            : None
sqlalchemy       : None
tables           : None
tabulate         : None
xarray           : None
xlrd             : None
xlwt             : None
numba            : None

>>>
</details>
