Make text_content more explicit about the types that it accepts.