[Debugger] code cleanup and make sure ObjectValue != null before dereferencing