Check that socket object exists before calling subscribe

This fixes #724, which was throwing an exception if publishCreate was called without a socket toOmit. It keeps the intended fix of #628 while removing the unintended side-effects of removing that check completely.

Sorry for the second pull request, I completely derped cause I am unused to creating pull requests from the frontend so I was merging into master.

Fixes #724
Fixes #626