instead of indexOf you could make allOrNothingAttrs a map of boolean values. I think we even have a helper method that can turn an array into such map. then you can simply do `allOrNothingAttrs[name]` and you are done.