add: if (!selectedFolder) return null; 
context: function GetFirstSelectedMsgFolder(){    var selectedFolder = gActionTargetElement.getAttribute("uri");    var msgFolder = GetMsgFolderFromUri(selectedFolder, true);    return msgFolder;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/987ae6bf26865d3fddd70d45a0f1cd10905433b9/FilterEditor.js/buggy/mailnews/base/search/resources/content/FilterEditor.js