diff --git a/serial.module b/serial.module
index ee61ef6..8b31bd4 100644
--- a/serial.module
+++ b/serial.module
@@ -79,6 +79,18 @@ function serial_form_alter(&$form, $form_state, $form_id) {
  * Implementation of hook_field_insert().
  */
 function serial_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
+    if (!empty($entity->nid)) {
+      $identifier = $entity->nid;
+    }
+
+    if (module_exists('profile2') && $entity instanceof Profile) {
+      $identifier = $entity->pid;
+    }
+
+    if (empty($identifier)) {
+      throw new Exception("Invalid identifier! Serial Field not supported on this Entity Type.");
+    }
+
     module_load_include('inc', 'serial');
     $sid = _serial_generate_value($entity->nid, $instance['bundle'], $field['field_name']);
     $items = array(array('value' => $sid));
