You should test `empty($context_detail['data']->objectives)` in `mica_commons_get_localized_field` so in templates you would have only 
```
<?php  mica_commons_get_localized_field($context_detail['data'], 'objectives'); ?>
```