BUG: 1.3.0 styler.render() throws exception when using highlight_max/highlight_min (code worked with pandas 1.2.5)
- [x] I have checked that this issue has not already been reported.

- [x] I have confirmed this bug exists on the latest version of pandas.

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

---

#### Code Sample
These are minimal examples which throw an exception. The same problem exist when you use `highlight_min` instead of `highlight_max`.
```python
import pandas as pd

# throws a TypeError("'>=' not supported between instances of 'int' and 'str'")
# pd.DataFrame({'col_0': [0, 'a']}).style.highlight_max().render()

# throws a TypeError("'>=' not supported between instances of 'Timestamp' and 'int'")
# pd.DataFrame({'col_0': [pd.to_datetime('1/1/2000'), 0]}).style.highlight_max().render()

# throws a ValueError('The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()')
pd.DataFrame({'col_0': [pd.period_range(start='2000-01-01', end='2000-01-02')]}).style.highlight_max().render()
```

#### Problem description
All examples worked in pandas 1.2.5 without throwing an exception.

#### Expected Output
The code doesn't throw an exception.

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit           : f00ed8f47020034e752baf0250483053340971b0
python           : 3.8.10.final.0
python-bits      : 64
OS               : Linux
OS-release       : 5.4.0-77-generic
Version          : #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8
pandas           : 1.3.0
numpy            : 1.21.0
pytz             : 2021.1
dateutil         : 2.8.1
pip              : 21.1.2
setuptools       : 57.0.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           : 3.0.1
IPython          : None
pandas_datareader: None
bs4              : None
bottleneck       : None
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : 3.4.2
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>
