The event dispatcher is optional; check it exists before using it
Merge pull request #4 from joncave/optional-dispatcher

The event dispatcher is optional; check it exists before using it