Hello,
As already stated lower null was becoz of extra result.addContextChange in ur code which i believe u must have removed. In addition to that, i don't think u need to run any loop becoz by looking ur queues it seems that u will always have 1 single queue in ur context? If yes, then u can remove for loop from ur code.
BTW, don't worry about first null just test ur mapping.
Thanks
Amit Srivastava