Add tests to make sure that ket is a ket... `if not ket.isket: raise ...`