 		{
 			// not supporting XML directly
 			if (sessionStateType == _XML_CLASS)
-			{
-				reportError("XML is not supported directly as a session state primitive type. Using String instead.");
-				_sessionStateType = String;
-			}
-			else if (sessionStateType != Object)
+				throw new Error("XML is not supported directly as a session state primitive type. Using String instead.");
+			
+			if (sessionStateType != Object)
 			{
 				_sessionStateType = sessionStateType;
-			}
+				_primitiveType = _sessionStateType == String
+					|| _sessionStateType == Number
+					|| _sessionStateType == Boolean
+					|| _sessionStateType == int
+					|| _sessionStateType == uint;
+			}
+			
 			_verifier = verifier;
 			
 			if (!sessionStateEquals(defaultValue))

	import mx.utils.ObjectUtil;
	
	import weave.api.WeaveAPI;
	import weave.api.reportError;
	import weave.api.core.ILinkableVariable;
	import weave.compiler.StandardLib;
	
	/**

		{
			return _verifier == null || _verifier(value);
		}
		
		protected var _primitiveType:Boolean = false;

		protected var _sessionStateType:Class = null;
		public function getSessionStateType():Class
