Error-[NOA] Null object access alu_env.sv, 44 The object at dereference depth 2 is being used before it was constructed/allocated. Please make sure that the object is allocated before using it

Hi All,
I am getting error during writing the UVM code of ALU. Will you Please help to solve this problem. I am stuck in my code.

class alu_env extends uvm_env;
  
  // factory registration
  
  `uvm_component_utils(alu_env)
  
  alu_agent  agent;
  alu_scb    scb;
  
  // create a constractor
  
  function new(string name = "alu_env",uvm_component parent);
    super.new(name,parent);
  endfunction
  
  // build phase
  
  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    agent = alu_agent :: type_id :: create("agent", this);
    scb   = alu_scb   :: type_id :: create("scb", this);
  endfunction
  
  // connect phase
  
  virtual function void connect_phase(uvm_phase phase);
   super.connect_phase(phase);
   agent.mon.item_collected_port.connect(scb.ip_fifo.analysis_export);
 endfunction
  
endclass

In reply to prity_sinha:

Unfortunately you do not show what is line 44 in your code.
I guess it is this line:

agent.mon.item_collected_port.connect(scb.ip_fifo.analysis_export);

Correct?
Please check if you are constructing the analysis port item_collected_port in your monitor.