make sure there isn't already an `id` before adding one