Raise TypeError when slice type is not understood.