If "options" is null or undefined, this blow up below. After this line, you should do:

    options || (options = {});