Simplify casting boolean attributes

I simplified the casting of boolean attributes. I wanted it to always return `true` or `false`, never `nil`, which it did previously when no value could be matched. Also, in my case `True` was returned for a boolean attribute which was casted to `nil`.