Minor fixes for Attributes#check!

* Removed code duplication
* Fixed formatting (blank lines)
* Fixed handling for attrs not in definitions