Raise an error when index name isn't a string