I need to create a trigger on a table that updates in every insert the value of a column if a condition is present. So in table like this:

I need the trigger to update all null values to '1' if "RegimeIva" = '3' in order to get a result like this:

I have tried:
create or replace TRIGGER AtualizaNat before INSERT ON Cabecdoc
for each row
BEGIN
if :new.IntrastatnatA is null and :new.intrastatnatB is null and :new.regimeiva = '3' then
:new.intrastatnatA : 1; :new.intrastatnatB : 1;
else
:new.intrastatnatA : null; :new.intrastatnatB : null;
end if;
END;
This is not working
= is nullneeds to beis nulland:= is null;needs to changed to:= null;- a_horse_with_no_name