PDF creation fails if no 'head_of_meeting' is selected.

The check could probably be merged with the one two lines further down by moving it above of the enclosing "if".