Raise a TypeError when text_content is passed bytes, so we get an error as early as possible.

Content objects are lazy, which is fine, except that in some cases this can made debugging much harder. One particular case I come across often is that text_content has been called with a bytes object, rather than a str object. The stack trace we get tells us what went wrong, but does not tell us where or when the content object was created, which is what we want to know in order to fix the issue.

This PR adds a simple check in python 3 to make sure that we're being passed a text object, not a bytestring.