support for array like obj in isList and toList