Add UserData: Object Reference not set to the instance of an object

Just digging a bit more i have found the following topic from @menno

Bug has been registered under: https://mcneel.myjetbrains.com/youtrack/issue/RH-23446
And I see the state is open.

@stevebaer, can you please comment? How to overcome this?
I am adding UserData from GH custom component.