Fix TR class support for new class expansion

Also add a type for `check-not-unsafe-undefined` which shows
up in the expanded code now.