check that opt.ssl is actually an object before trying to create a credentials context.
0.2.1