Geometry.Explode dereferencing a non-pointer

I’m experimenting with code kindly given to me by @sovitek, however when testing on some models I am met with the ‘dereferencing a non-pointer’ error. I know this normally occurs when a node is fed an unexpected null value, however I don’t have a great enough understanding of how the previous node, imported from the Ampersand package, works.

If anyone could either point me in the direction of some documentation so I can better understand how the closed loops from curves node works, or provide me some guidance on the issue I would be grateful.

I think the issue may be coming from the fact that there are overlaps once the walls are extended, due to a curtain wall grid around the outside of the building, but I am not sure. Here is an image of the walls of one building for reference.

What is the output of the polycurve node? Is there any chance you could show a screenshot of that?

it is just a null value

Screenshot 2023-07-18 165815

My guess is the & node is failing due to any one of a number of reasons. Hard to say without those data previews expanded.