Add checking for id_t, and changed some of the type checking to use