merges a bunch of six.text.type validation