better error messages for failed type assumptions