Replace obvious unicode() with text_type.

This was a part of #344