model.js: fix an error when parsing null string

Avoiding error when accessing a null string in map.
Merge pull request #31 from sbourdelin/typo_and_fix

model.js: fix an error when parsing null string