after the latest changes, when we are testing outside a device (nightly, for example) we need to check if settings exist before creating the lock.
````
if (navigator.mozSettings) {
      var lock = window.navigator.mozSettings.createLock();
      this.enable(lock);
      this.enableDebugging(lock);
    }
```