I had this issue today, the way to check this is with a getter method on the component
get hasDuplicates(){
if(this.dupLeads && this.dupLeads.length){
return true;
}
return false;
}
Make sure to check for BOTH the variable and then the variable length (as I'm doing in my if statement). This is because the getter is apparently called multiple times while the page is being loaded, and the first few times, the wired variable will be undefined, which will cause an error if you try to access the .length property.
So first you check if it's defined, and if so, check if it has a length property. If it has then it means that the wire service returned some data (as opposed to an empty "data" object).