Use `basestring` instead of `str`.