C-sharp : Error handling: catching NullReferenceException