Replace obvious unicode() with text_type.