Fix client options null crash

Javascript's type categorization continues to amaze and confuse. Adding in a check if null is passed in as the options object.

cc @squamos