Check for main thread.