      */
     override public function get numLayoutItems():int
     {
-        return dataProvider.length;
+        return dataProvider ? dataProvider.length : 0;
     }
     
     /**

    public function DataGroup()
    {
        super();
        
        // TODO (rfrishbe): work on initialization of dataProvider
        _dataProvider = new ArrayCollection();
        _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);
    }
    
    private var skinRegistry:Dictionary;
    
    // item renderer
    public var itemRenderer:IFactory;   
    public var itemRendererFunction:Function; // signature: itemRendererFunction(item:*):IFactory
    
    // TODO (rfrishbe): be smarter about initialization
    private var _dataProvider:IList;
    private var dataProviderChanged:Boolean = false;
    private var needsDisplayObjectAssignment:Boolean = false;
    
    public function set dataProvider(value:IList):void
    {

    
        registerSkin(item, itemSkin);

        return itemDisplayObject;
    }
    
    protected function registerSkin(item:*, itemSkin:Object):void
    {
        if (!skinRegistry)
            skinRegistry = new Dictionary(true);
