Is this check really needed? The event will not be fired if it was not configured anyway