Adding the ability to build a local model from a JSON local file

because that would cause a ReferenceError
http://www.hacksparrow.com/javascript-check-object-property-is-defined.html