can we have a thread id that had a value 0 ?

with a number we didn't have any problem but with integer we can have this problem. Therefore I'd use `currentThread != null` to test if it exists. (note: comparing to null with `!=` compares to null _and_ undefined, so that's what we want)