Oh shoot! My blunder! I've been using attribute rules extensively along with arcade so when I read your post, that's what I was thinking, not attribute assistant. My apologies.
In this case, I would avoid the whole generate ID approach and try a nested IIF() function , but looking at he online help for AA, the IIF() explicitly states ' ...functions cannot be used on Null values.'
What if you were to first calc all your <Nulll> values to equal '' (blank, not null) or 'NA' and then use the IIF () function that way. (Personally I'm not a fan of blank values, so I'd prefer NA or some other notation). As I recall, the IIF() function in AA can be challenging (at least for me they were), so first play with it so one half of your desired results work, and then 'nest' the the next part in.
Again, sorry for chasing down the wrong rabbit hole.
That should just about do it....