Use given _id if any, otherwise a uid