If layer is optional you'll this here:

```js
this.layer_ = goog.isDef(opt_options.layer) ? opt_options.layer : null;
```