Reading Language from the Array / Object Safely

In Drupal when grabbing info from an array or object you often need the "Language" of the entity to grab the data you need.   Most of the time in the sites we are building, we end up with the language of 'und' for undefined.  Care should be taken to not hardcode in the value of 'und'. Whenever possible, read it from the data you are trying to read, but build in a safety just in case it is not there.
It should look seomthing like this:

<?php
   $sLanguage
= (!empty($oNode->language)) ? $oNode->language  : 'und';
?>

Then you can use $sLanguage to get the values you are trying to extract (with proper checks for presence of data to not throw php notices)

<?php
  $sImageAlt
= (!empty($oNode->preview_image[$sLangage]['alt'])) ?  $oNode->preview_image[$sLangage]['alt'] : '' ;
?>

section: