Bug fix to writing to nil channel.

When publishing with no callbacks, Publish() tries to write to a nil channel. Guarded the write channel with a check.