Guard against inscrutable error messages when passing badly-behaved values in place of types
This solves for an exotic class of inscrutable errors that arise when ill-behaved objects
(either nonhashable or noncomparable) find their way into APIs that expect to see types or the
typealikes from typing, etc.
Test Plan: Unit
Reviewers: #ft, alangenfeld, schrockn
Reviewed By: #ft, schrockn
Differential Revision: https://dagster.phacility.com/D1383