better check for Py2 strings