InvalidArgumentException thrown

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