var thread = process.Threads.FirstOrDefault(thread => thread.Id == threadId)

if (thread != null)
{

}
else 
{
    // 400
}