Use toArray instead of isCollection
More IE-friendly testing