User can pass in null or undefined in place of opts

This takes care of the case where for some reason the user only passes
in the first argument.