I think this is how I’d approach it… See if it works for you?
I think you’re right that if the first list is empty, lots of Dynamo nodes don’t work properly.
I’m not keen on the boolean filter in this instance, as it changes the list structure, which might be a problem…
I expect lots of people will have better methods than me
You have to be careful to use the Clockwork ScopeIf+, the OOTB IF doesn’t work & ScopeIf can freeze your graph if you’re not careful.
Hope that’s useful,
You might want a replace Null in there as well…I think you’re going to struggle if your first list has varying nested Empty lists, if your condition is regular then you can set the replacement to a specific arrangement. Otherwise you might need to get into python… Which is going to be quite involved because you need to deal with nesting and lacing… So Python in a custom node would likely be the best way…
elementList = IN
replacement = IN
Output = 
for element in elementList:
subList = 
if element == :
OUT = Output