Null reference exception control added for CancellationTokenSource