Check if message is null before triggering event