remove nil, empty and new line entries if the join option is passed to the for tag