How about line 64 then (event = entry.get('event', config['event']))? Should that not be enough to prevent a nullpointer exception?