final Iterator<String> propertyNames = elementDefinition.getGroupBy().iterator();
boolean hasValue = false;
while (propertyNames.hasNext()) {
String propertyName = propertyNames.next();
final TypeDefinition typeDefinition = elementDefinition.getPropertyTypeDef(propertyName);
<BUG>if (typeDefinition != null) {
Object value = properties.get(propertyName);
try {</BUG>
if (null != value) {
final byte[] bytes = typeDefinition.getSerialiser().serialise(value);

final Iterator<String> propertyNames = elementDefinition.getGroupBy().iterator();
boolean hasValue = false;
while (propertyNames.hasNext()) {
String propertyName = propertyNames.next();
final TypeDefinition typeDefinition = elementDefinition.getPropertyTypeDef(propertyName);
final Serialisation<?> serialiser = (typeDefinition != null) ? typeDefinition.getSerialiser() : null;
try {
if (null != serialiser) {
Object value = properties.get(propertyName);
if (null != value) {
final byte[] bytes = typeDefinition.getSerialiser().serialise(value);
