No data available isn't a error - it meant there isn't any data in your object for your certain selection. Therefore you need another approach. A very simply way is to count/sum the main-calculation from your object in a variable and if the result is greater then 0 then there are data available.
var CheckData = if(sum(VALUE) > 0, true(), false())
If ActiveDocument.Variables("CheckData").GetContent.String = true Then