Actually, if we expect an object we can simply do:

```js
if (!curMap)
  continue;
```