I think this must be aware of null: return $dataValue->getValue() !== null ? $dataValue->getValue() : null;