FoxxModel.set validation

Fixes #926. Also implemented basic type checking.
Could you please combine var statements? :smile: There's not yet an official Foxx styleguide, but this is definitely in there :wink: