I am not sure I understand you. You can make sure the key is a string like this
if(!key) {
return;
}
var k = String(key);
var t = bowl[k];
Or you can check if the key exists:
if(typeof(bowl[key]) !== 'undefined') {
var t = bowk[key];
}
However, I don't think you have posted the non-working code?