This will fail if, for whatever reason, `this._file` is `0`. Let's do

    if (this._file != null) {

instead, so that we only omit the `file` property from the map when `this._file` is `null` or `undefined`.