public function get($field)
    {
        if ($this->definition->getField($field, 'value') !== null) {
            return $this->definition->getField($field, 'value');
        }

        if (!array_key_exists($field, $this->entity)) {
            return null;
        }

        $type  = $this->definition->getType($field);
        $value = $this->toType($this->entity[$field], $type);
        return $value;
    }