More systematic approach to tool validation

This employs similar technique to what `HasProps.__setattr__()` uses.
I did those PRs separately. I merged `master` into this one.