dispatchEvent: Skip null related objects.

Signed-off-by: mk124 <mk124a@gmail.com>