@gwhPoster – the snippet removes hyperlinks without destinations.
So you cannot use it for your destinations without a source.
You could try (CAUTION. I did NOT test that yet !! ) :
source === null
instead of
destination === null
in my snippet. Test that on a duplicate of your InDesign file…
Uwe