model.js: fix an error when parsing null string

Avoiding error when accessing a null string in map.