Maybe `options.server || null`? It's either an object or undefined. I believe that forces the TLSSocket constructor into polymorphic IC mode.  (I am admittedly not 100% sure on this. :-))