Calling randomize() doesn’t allocate objects. You have to call it on objects that were already created. In your case sti is null. You have to create it before:
sti = new();
if(sti.randomize() with {cs_0==1; we_0==1; cs_1==1; we_1==0; oe_1==0; })
//...