When setting notification, make sure client is not null before checking whether or not it's the local device.