You can do just as you did before but check for the length of results. If the number is zero, you got a no go.
Depending on what action you attending to perform, you could also use the unindexed iterator.
for(var element in d.results){
doYourMagic(element);
}
I haven't seen your code so it's a bit har to tell, but generally, if you wish to check if you got a nothing, you can use something like this.
if(myElement){
alert("You got something");
} else {
alert("No such thing!");
}
I'm assuming we're talking JavaScript, right?