Don't invoke the listener if it is null