In the py2 helper submodule, I think there's a _strtypes to assist with this