Could be improved even more with using {% empty %} in the for-loop.