Custom resolver for import

Hello guys, I tried to create a custom resolver for import, I get an error and don’t understand why :

public function resolve(\stdClass $config, int $parentId, array $rowData)
        $resolverSettingParams = json_decode($config->resolverSettings->params, true);

        if(!is_array($resolverSettingParams)) {
            throw new \Exception('please provide a valid userId resolver option');

        $idColumn = $this->getIdColumn($config);
        $id = $rowData[$idColumn];
        $product = new Product();
        return $product;

The error is :

Class id is null

I confirm that the product with id = 79 exist