str or unicode type checking