Purpose of returning null is to stop partition hash calculation when there's no explicit partition key;

````java
Object pk = strategy.getPartitionKey(obj);
if (pk != null) {
      final Data partitionKey = toData(pk, EMPTY_PARTITIONING_STRATEGY);
      data.partitionHash = (partitionKey == null) ? -1 : partitionKey.getPartitionHash();
}
````