more robust validation of allocation type (#49269)
We generally hit the runtime in pretty specific places when allocations
look funky (because they are missing a typevar bound, so inference is
not too willing to deal with it). Try to throw an error in those cases
before those can get allocated and cause problems later from being
non-concrete objects.
Fix #49203