I'd have gone for leaving this to not accept null, and to change the one caller: `if (type==null && attrs != null) type = extractServiceTypeAttribute(attrs);`. But no strong feelings.

(I agree more than you do with Guava's philosophy of nulls not being what's wanted in most situations, being bugs or "lazy" coding - and that it's worth the cost of doing null checks earlier so that nulls aren't passed in. But figure we agree to disagree on that; brooklyn has lots of places where nulls are valid (e.g. config key values being explicitly null etc) that Guava's philosophy in ImmutableMap etc often hurts us.)