Fix to avoid iterating None on makemessages -a

If you run makemessages -a locales defaults to None and the for loop tries to iterate over it raising an error.