I am trying to use eval to see if a particular object exists but its throwing back an error because the object doesnt exist, but thats the whole point. Is there a work around?

Basically this is what im trying to do.

Code:
eval("if(txt" + varName + " != null) bObjExists = true;");
if(bObjExists) {
  // Create the control
}
// otherwise dont.
Error: 'txtiQaNum' is undefined.
Code: 0