Clean up the python2/python3 string type handling