private static void expectTensorIsNonEmpty(Field field, Tensor tensor) {
        if (tensor.isEmpty()) {
            throw new IllegalArgumentException("Add update for field '" + field.getName() + "' does not contain tensor cells");
        }
    }
Reader of an "add" update of a tensor field.
document/src/main/java/com/yahoo/document/json/readers/TensorAddUpdateReader.java