don't change the type tag too early during casts
add typeof() metatype