Handle non-ObjectID ids

Apologies for not creating a separate branch. ObjectIDs are always either 12 bytes or 24 hex characters; anything else is a custom ID and should be handled as such.