Looks like I was able to get it sorted!
function checkCompName(){
for (var i = 1; i <= app.project.numItems; i++){
if (app.project.item(i).name == colorText.text){
theImage.replaceSource(app.project.item(i), true);
break;
}else{
for (var j = 1; j <= app.project.numItems; j++){
if (app.project.item(j).name == "Blank"){
theImage.replaceSource(app.project.item(j), true);
break;
}
}
}
}