TypeError thrown

Argument 1 passed to IteratorIterator::__construct() must implement interface Traversable, null given