make sure we can't set token if we get a null or non-object back