InvalidArgumentException thrown

Invalid argument passed to foreach resp. NSmartCachingIterator; array or Traversable expected, string given.