The argument to this method is really a Map<String, String>, but if list / boolean values in the Capability map could be evaluated as such, and not as Strings, then all of this logic can go away.