Remove valid_type? method

It was supposed to be removed by the preceding two reversions but I did
them in the wrong order.