Wouldn't it be better to explicitly check for `if (typeof(frame.filename) === 'undefined')` ?