 			var visitor:Function;
 			if (input is Array) {
 				visitor = (input as Array).forEach;
-			} else if (input is DataList) {
-				visitor = (input as DataList).visit;
 			} else if (input is Function) {
 				visitor = input as Function;
+			} else if (Object(input).hasOwnProperty("visit") &&
+					   Object(input).visit is Function) {
+				visitor = Object(input).visit as Function;
 			} else {
 				throw new ArgumentError("Illegal input argument: "+input);
 			}

			// collect and filter
			if (_where != null) {
				visitor(function(item:Object, ...rest):void {
					if (_where.predicate(item)) {
						results.push(item);
					}
				});
			} else {
				visitor(function(item:Object, ...rest):void {

		 *  format of the <code>flare.util.Sort</code> class methods.
		 * @see flare.util.Sort
		 */
		public function Query(select:Array=null, where:*=null,
							  orderby:Array=null, groupby:Array=null)
		{
			if (select != null) setSelect(select);
			this.where(where);
			_orderby = orderby;
			_groupby = groupby;
		}
