I moved this to a better location, and changed it to a void function. After moving `xalloc` to be called after the last `Check_Type` call, no memory leaks can occur, so I'm not sure how much sense it makes to handle all the type checking ourselves, if that gives us no benefit over the current code.