fixed None returned instead of iterator in empty blocks or templates