Give the gift of Drupal. All merchandise is 50% off through 2016.
entity_extract_ids() should produce a NULL if the entity has no ID yet.
However, in hook_field_attach_form() with the product form, I get an empty string.
(Marking as major as it's going to cause problems with, which is how I've encountered it.)