Modify how insert IDs are retrieved to sanity check they are numbers, and cast accordingly.