FoxxModel.set validation

Fixes #926. Also implemented basic type checking.
I'm not sure why you consider underscore more readable than plain ES5, but I guess that's a matter of taste. Underscore is already used in that file, so it's trivial to swap in.