join handles case when iterating over empty container