I have below code in c# 4.0.
//Dictionary object with Key as string and Value as List of Component type object Dictionary>
You also can use this:
var firstOrDefault = lstComp.FirstOrDefault(); if(firstOrDefault != null) { //doSmth }