- FeatureAttributeType attributeType = metadata.getAttributeType(key);
- if (attributeType == FeatureAttributeType.Float
- || attributeType.equals(FeatureAttributeType.Integer))
+ FeatureAttributeType attType = metadata.getAttributeType(key);
+ if (attType != null
+ && (attType == FeatureAttributeType.Float || attType
+ .equals(FeatureAttributeType.Integer)))