throw new InvalidGraphException("Accessing not existing attribute with key " + eachDataElement.getKey()); if (keyType.getAttrType() == null) { throw new InvalidGraphException("Key with id='" + keyType.getId() + "' and " + "attribute name '" + keyType.getAttrName() + "' is null. " + "The following values are supported: " + Arrays.stream(KeyTypeType.values()).map(KeyTypeType::value).collect(Collectors.joining(", "))); Object value = typeCastValue(eachDataElement.getContent(), keyType.getAttrType()); graphElement.setProperty(keyType.getAttrName(), value); .forEach(keyType -> { if (graphElement.getProperty(keyType.getAttrName()) == null) { graphElement.setProperty(keyType.getAttrName(), typeCastValue(keyType.getDefault().getContent(), keyType.getAttrType()));