RSS Feed with 1 'undefined' node, and a backup plan needed!

Hi,

I have the following code that is a part of an XML object in my actionscript. It fills a dynamic text field (which is buried in a few symbols) with text from the RSS feed.

Problem is, one of the nodes on the RSS feed is empty. When it’s empty, my text field returns ‘undefined’. I’ve tried with the code below to specify if the text is ‘undefined’, then it should display something else, like HELLO for instance.



var news = newsNode.item[rssCounter].description.getValue();
	
	if (news.htmlText == "undefined") {
		_root.afterpreload.everything.ticker.newsmc.head.htmlText = "HELLO";
	}else{
		_root.afterpreload.everything.ticker.newsmc.head.htmlText = news;
	}


I’ve had no luck, as the feed just plays as normal returning an ‘undefined’ whenever I get to the node with no data.

I’ve also tried…

 

if(news.htmlText == "") {


…but had no luck there either. Any help would be greatly appreciated.