The error indicates that the Robot Cont Ref variable is empty or points to a destroyed object.
First add Invalid node becord doing anything with it, to keep your code from throwing errors if it is empty or points to invalid reference.
Next you must make sure that variable is getting set to a valid object before it is need by the code you have shown.
Can you show code where you have set the value of that variable?