I didn't bother keeping the array check, because it now passes `$data` to the `ArrayIterator` constructor, which would throw an error anyway indicating that an array was expected.