Detecting Params If none then send em'

Good morning yall. Question I wrote this little gallery module that uses a DB and flash for some family and friends. I have a question about what to do if there are no pictures for a certain user. Here is how I am grabbing the params:

AS:


 
function loadXML(loaded) {
 if (loaded) {
  xmlNode = this.firstChild;
  image = [];
  title = [];
  description = [];
  thumbnails = [];
  total = xmlNode.childNodes.length;
  for (i=0; i<total; i++) {
   image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
   title* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
   description* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
   thumbnails* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
   thumbnails_fn(i);
  }
  firstImage();
 } else {
  content = "file not loaded!";
 }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("/f&f/galleryimage.xml.aspx?pid=" + pid); 

Now if there is no readable XML list for that person how can I go about detecting that and then sending them to frame 2 where a message would be displayed. Everything is built on frame 1. I am using Flash 8. And everything works great and pulls fine from database however if there are no images for that person it looks kinda ugly with a bunch of undefined text ect… Thanks in advance yall. Im gonna hunt around the Nets and see if I can learn anything new on this. Hit me with any advice. MT