Give better error messages when trying to use the wrong kind of Tensor.