Fix Django exceptions when lists (eg. distro/profiles) are empty.