If you're certain the token exists in either of the objects you can do:
First check for the existence of the value in data.
var value = data.d || data.value;
then access the value to get the token
var token = value && value.GetContextWebInformation.FormDigestValue;
var value = data.d || data.value;
var token = value && value.GetContextWebInformation.FormDigestValue;
if (token) {
this.options.token = token;
}