fix: properly handle boolean attributes

Fixes #37

This is my first stab at fixing #37 - don't think it is complete fix at this point, but pushing code to start discussion on this item. More specifically I'm not sure if:
* we should be checking a type of a node on which a given attribute is used
* which attributes we should be taking into account - some of those attributes should probably cooperate with the `model` attribute to provide code validation...