only accept unicode or bytes strings