I think you can drop `&& values.containsKey(type)` - it would return null if the type is not in the map then `truthy()`would be `false`.