string.len can't get struct's size.
Tables are the only "container" type in Lua.
We can get the "length" of an array using the # operator.
But the # operator doesn't count all the items in the table.
So when ttype equals to list, # should be OK.