result["instance"] being None.
I just pulled the latest repos to test Action icons and indeed found these returning None. It’s strange that before it did actually work and run through the code. Was it ignoring the context maybe? Anyway, thanks @tokejepsen, checking for None works as expected.