check for str OR unicode