Not able to pass accesstoken from login api to logout api

‘Add REST parameter using local variable from Variables tab’
RequestObject request = findTestObject(‘logout’)
for (TestObjectProperty header: request.getHttpHeaderProperties()) {
println(header.getName())
if (“AccessToken”.equals(header.getName())) {
header.setValue(GlobalVariable.UserToken);
break;
}
}

ERROR:

08-10-2017 05:13:00 PM - [FAILED] - Unable to send request (Root cause: java.lang.NullPointerException)
08-10-2017 05:13:00 PM - [FAILED] - Test Cases/logout FAILED because (of) Unable to send request (Root cause: java.lang.NullPointerException)
08-10-2017 05:13:00 PM - [END] - End Test Suite : Login-Logout suite

What should it be? Please let me know

Please correct your id of Request Object in findTestObject