not all DisplayObject has children

reference to `displayObject.children.length` was failing because `children` property exists only in `DisplayObjectContainer`.