'str' type validation is done with checking if six.text_type in order to support python2