can you use `basestring` here instead of `str` so that we include things like bytes, unicode etc.