server: wrap event calls in null checks

It is possible that zeroconf callbacks happen at odd times. We need to be
conservative.