FoxxModel.set validation

Fixes #926. Also implemented basic type checking.
And pull in all those other var statements below.