Only encode `text_type` objects.