replace some generic `str` type hints with something better.
replace some generic
strtype hints with something better.