public static boolean checkPropertyNotNull(final GraphObject node, final PropertyKey key, final ErrorBuffer errorBuffer) {
String type = node.getType();
if (key == null) {
errorBuffer.add(type, new EmptyPropertyToken(UnknownType));
return true;
}
Object value = node.getProperty(key);
if (value != null) {
if (value instanceof Iterable) {
if (((Iterable) value).iterator().hasNext()) {
return false;
}
} else {
return false;
}
}
errorBuffer.add(type, new EmptyPropertyToken(key));
return true;
}