diff --git a/geocoder.widget.inc b/geocoder.widget.inc
index 06f9e32..55fca87 100644
--- a/geocoder.widget.inc
+++ b/geocoder.widget.inc
@@ -532,10 +532,12 @@ function geocoder_widget_parse_locationfield($field_item) {
 function geocoder_widget_get_link($entity_type, $entity) {
   $uri_info = entity_uri($entity_type, $entity);
   list($id, , $bundle) = entity_extract_ids($entity_type, $entity);
-  $label = t('View offending @entity_type (@bundle # @id)', array(
-    '@entity_type' => $entity_type,
-    '@bundle' => $bundle,
-    '@id' => $id,
-  ));
-  return l($label, $uri_info['path'], $uri_info);
+  if (!empty($id) && !empty($bundle)) {
+    $label = t('View offending @entity_type (@bundle # @id)', array(
+      '@entity_type' => $entity_type,
+      '@bundle' => $bundle,
+      '@id' => $id,
+    ));
+  }
+  return !empty($label) ? l($label, $uri_info['path'], $uri_info) : '';
 }
\ No newline at end of file
