Error-[NOA] Null object access

I recieved this error
Error-[NOA] Null object access
…/apb_adapter.sv, 26
The object at dereference depth 0 is being used before it was
constructed/allocated.
Please make sure that the object is allocated before using it.

26 in error shows the line number 5 of the following code.

function void bus2reg(uvm_sequence_item bus_item, ref uvm_reg_bus_op rw);
    apb_transaction pkt;
    if(!$cast(pkt,bus_item))
    `uvm_fatal("apb_adapter","reg_sequence can't be casted to apb_transaction")
    rw.data = pkt.apb_data;
    rw.addr = pkt.apb_addr;
    rw.kind = pkt.apb_write? UVM_WRITE : UVM_READ;
    rw.status = UVM_IS_OK;
    `uvm_info(get_type_name(),$sformatf("Bus2Reg %s",pkt.sprint()),UVM_MEDIUM)
endfunction

Can anybody explain why i am having this error?

In reply to baberali:

You are going to have to debug further by find out whether bus_item or rw was null. Most likely it was bus_item because your driver sent a null response.

In reply to dave_59:
I have implemented explicit prediction. bus_item is coming from monitor analysis port. So bus_item is not null but how can rw be null which is passed by reference.

In reply to baberali:

The fact that rw is passed by reference does not mean it cannot be null. It is basically a double reference to a variable holding a reference to a uvm_reg_bus_op object. Something in your response handling is not set up correctly.