if ( x != null )
   {
   x.doSomething();
   }