if its an instance of Boolean, you can cast it directly. You don't need to call .booleanValue()