Use six.text_type instead of our custom function