Check for empty field I'm using the following method to check whether a variable is set before printing

if (isset($content['field_name'])):
print render($content['field_name']);
endif;


But when the field is empty, unknown is printed. 

Is there a Drupal method for checking empty variables?
$content['field_name'] is always set.
You can check if it's empty.


if (isset($content['field_name']) && !empty($content['field_name']):
  print render($content['field_name']);
endif;