Safer check for `isInCurrentQueueStack` in the case of the main queue. We can simply check if we are in the main thread.