Index: org/jivesoftware/xiff/data/auth/AuthExtension.as
===================================================================
--- org/jivesoftware/xiff/data/auth/AuthExtension.as	(revision 10969)
+++ org/jivesoftware/xiff/data/auth/AuthExtension.as	(working copy)
@@ -154,8 +154,11 @@
 		 * The username to use for authentication.
 		 */
 		public function get username():String 
-		{ 
-			return myUsernameNode.firstChild.nodeValue; 
+		{
+			if(myUsernameNode && myUsernameNode.firstChild)
+				return myUsernameNode.firstChild.nodeValue;
+			
+			return null; 
 		}
 	
 		/**
@@ -170,8 +173,11 @@
 		 * The password to use for authentication.
 		 */
 		public function get password():String 
-		{ 
-			return myPasswordNode.firstChild.nodeValue;
+		{
+			if(myPasswordNode && myPasswordNode.firstChild)
+				return myPasswordNode.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		/**
@@ -192,8 +198,11 @@
 		 * The SHA1 digest to use for authentication.
 		 */
 		public function get digest():String 
-		{ 
-			return myDigestNode.firstChild.nodeValue;
+		{
+			if(myDigestNode && myDigestNode.firstChild)
+				return myDigestNode.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		/**
@@ -214,9 +223,12 @@
 		 *
 		 * @see org.jivesoftware.xiff.core.XMPPConnection#resource
 		 */
-		public function get resource():String 
-		{ 
-			return myResourceNode.firstChild.nodeValue 
+		public function get resource():String
+		{
+			if(myResourceNode && myResourceNode.firstChild)
+				return myResourceNode.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		/**
Index: org/jivesoftware/xiff/data/forms/FormExtension.as
===================================================================
--- org/jivesoftware/xiff/data/forms/FormExtension.as	(revision 10969)
+++ org/jivesoftware/xiff/data/forms/FormExtension.as	(working copy)
@@ -266,7 +266,15 @@
 	     *
 		 * @availability Flash Player 7
 	     */
-	    public function get instructions():String { return myInstructionsNode.firstChild.nodeValue; }
+	    public function get instructions():String 
+	    {
+	    	if(myInstructionsNode && myInstructionsNode.firstChild)
+	    		return myInstructionsNode.firstChild.nodeValue;
+	    	
+	    	return null;
+	    }
+	    
+	    
 	    public function set instructions(val:String) :void
 	    { 
 	        myInstructionsNode = replaceTextNode(getNode(), myInstructionsNode, "instructions", val);
@@ -277,7 +285,15 @@
 	     *
 		 * @availability Flash Player 7
 	     */
-	    public function get title():String { return myTitleNode.firstChild.nodeValue; }
+	    public function get title():String
+	    {
+	    	if(myTitleNode && myTitleNode.firstChild)
+	    		return myTitleNode.firstChild.nodeValue;
+	    	
+	    	return null;
+	    }
+	    
+	    
 	    public function set title(val:String) :void
 	    { 
 	        myTitleNode = replaceTextNode(getNode(), myTitleNode, "Title", val);
Index: org/jivesoftware/xiff/data/Message.as
===================================================================
--- org/jivesoftware/xiff/data/Message.as	(revision 10969)
+++ org/jivesoftware/xiff/data/Message.as	(working copy)
@@ -203,7 +203,7 @@
 		 */
 		public function get subject():String
 		{
-			if (mySubjectNode == null) return null;
+			if (mySubjectNode == null || mySubjectNode.firstChild == null) return null;
 			return mySubjectNode.firstChild.nodeValue;
 		}
 		
@@ -222,7 +222,7 @@
 		 */
 		public function get thread():String
 		{
-			if (myThreadNode == null) return null;
+			if (myThreadNode == null || myThreadNode.firstChild == null) return null;
 			return myThreadNode.firstChild.nodeValue;
 		}
 		
Index: org/jivesoftware/xiff/data/muc/MUCExtension.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCExtension.as	(revision 10969)
+++ org/jivesoftware/xiff/data/muc/MUCExtension.as	(working copy)
@@ -107,7 +107,10 @@
 		 */
 		public function get password():String
 		{
-			return myPasswordNode.firstChild.nodeValue;
+			if(myPasswordNode && myPasswordNode.firstChild)
+				return myPasswordNode.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		public function set password(val:String):void
Index: org/jivesoftware/xiff/data/muc/MUCItem.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCItem.as	(revision 10969)
+++ org/jivesoftware/xiff/data/muc/MUCItem.as	(working copy)
@@ -98,7 +98,10 @@
 	
 		public function get reason():String
 		{
-			return myReasonNode.firstChild.nodeValue;
+			if(myReasonNode && myReasonNode.firstChild)
+				return myReasonNode.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		public function set reason(val:String):void
Index: org/jivesoftware/xiff/data/muc/MUCStatus.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCStatus.as	(revision 10969)
+++ org/jivesoftware/xiff/data/muc/MUCStatus.as	(working copy)
@@ -33,7 +33,10 @@
 		 */
 		public function get message():String
 		{
-			return node.firstChild.nodeValue;
+			if(node.firstChild)
+				return node.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		public function set message(val:String):void
Index: org/jivesoftware/xiff/data/register/RegisterExtension.as
===================================================================
--- org/jivesoftware/xiff/data/register/RegisterExtension.as	(revision 10969)
+++ org/jivesoftware/xiff/data/register/RegisterExtension.as	(working copy)
@@ -22,11 +22,12 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.IExtension;
+	import flash.xml.XMLNode;
+	
 	import org.jivesoftware.xiff.data.Extension;
 	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import flash.xml.XMLNode;
+	import org.jivesoftware.xiff.data.IExtension;
+	import org.jivesoftware.xiff.data.ISerializable;
 		
 	/**
 	 * Implements jabber:iq:register namespace.  Use this to create new accounts on the jabber server.
@@ -141,7 +142,10 @@
 	
 		public function get key():String 
 		{ 
-			return myKeyNode.firstChild.nodeValue; 
+			if(myKeyNode && myKeyNode.firstChild)
+				return myKeyNode.firstChild.nodeValue;
+			
+			return null; 
 		}
 	
 		public function set key(val:String):void
@@ -150,8 +154,11 @@
 		}
 	
 		public function get instructions():String 
-		{ 
-			return myInstructionsNode.firstChild.nodeValue; 
+		{
+			if(myInstructionsNode && myInstructionsNode.firstChild)
+				return myInstructionsNode.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		public function set instructions(val:String):void
@@ -161,7 +168,11 @@
 	
 		public function getField(name:String):String
 		{
-			return myFields[name].firstChild.nodeValue;
+			var node:XMLNode = myFields[name];
+			if(node && node.firstChild)
+				return node.firstChild.nodeValue;
+				
+			return null;
 		}
 	
 		public function setField(name:String, val:String):void
Index: org/jivesoftware/xiff/data/search/SearchExtension.as
===================================================================
--- org/jivesoftware/xiff/data/search/SearchExtension.as	(revision 10969)
+++ org/jivesoftware/xiff/data/search/SearchExtension.as	(working copy)
@@ -119,8 +119,11 @@
 		}
 	
 		public function get instructions():String 
-		{ 
-			return myInstructionsNode.firstChild.nodeValue; 
+		{
+			if(myInstructionsNode && myInstructionsNode.firstChild)
+				return myInstructionsNode.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		public function set instructions(val:String):void
@@ -130,7 +133,11 @@
 	
 		public function getField(name:String):String
 		{
-			return myFields[name].firstChild.nodeValue;
+			var node:XMLNode = myFields[name];
+			if(node && node.firstChild)
+				return node.firstChild.nodeValue;
+			
+			return null;
 		}
 	
 		public function setField(name:String, val:String):void
Index: org/jivesoftware/xiff/data/XMPPStanza.as
===================================================================
--- org/jivesoftware/xiff/data/XMPPStanza.as	(revision 10969)
+++ org/jivesoftware/xiff/data/XMPPStanza.as	(working copy)
@@ -269,10 +269,10 @@
 				//return myErrorConditionNode.nextSibling.firstChild.nodeValue;  // fix recommended by bram 7/12/05
 				return errorCondition.toString();
 			}
-			else {
+			else if(myErrorNode && myErrorNode.firstChild) {
 				return myErrorNode.firstChild.nodeValue;
 			}
-			
+			return null;
 		}
 		
 		public function set errorMessage( theMsg:String ):void
