If this is common, it is better to use a helper function to assert the correct type using runtime type check, a "type cast" type expression or or similar:
/**
@param {whatever} title
@return {string}
*/
function getVal(title) {
var val = title.val();
if (typeof val != "string") {
throw Error("expected string");
}
return val;
}