pub fn check_type(env: &Env<'_>, t: &IDLType) -> Result<Type>