bpo-34536: raise error for invalid _missing_ results (GH-9147)

* raise exception if _missing_ returns None or invalid type
3 files changed