if (key == null)
return null;
final Object indexResult = index.get(key);
if (indexResult instanceof Collection)
return (Collection<OIdentifiable>) indexResult;
<BUG>if (indexResult == null)
return null;
return indexResult == null ? null : Collections.singletonList((OIdentifiable) indexResult);
} else {</BUG>
final Object keyOne = indexDefinition.createValue(keyParams);

if (key == null)
return null;
final Object indexResult = index.get(key);
if (indexResult instanceof Collection)
return (Collection<OIdentifiable>) indexResult;
if(indexResult == null)
return Collections.emptyList();
return Collections.singletonList((OIdentifiable) indexResult);
} else {
final Object keyOne = indexDefinition.createValue(keyParams);
