fix(tls): only setup the error callback if non-nil
Merge pull request #495 from luvit/fixes/tls_error_cb

fix(tls): only setup the error callback if non-nil