protected function getSortkeyValue($object, $valueName) {
    $value = $object->getValue($valueName);
    if ($value == null) {
      $value = $object->getOID()->getFirstId();
    }
    return $value;
  }