semantic: Check getExpType result and panic on null.