Add get type method for supporting llvm.