When JSONifying something null, we don't want to crash

gremlin.toJSON does not check if an object is defined before checking for a .unwrap member, which can result in crashes when it should just result in an error getting passed to the callback.