If you know that list is going to populated you could simply check TypeOf(a[1]). That's not the best choice since it will fail on an empty list or if "a" isn't a list. This code should do the trick:
[-] testcase aaa() appstate none
[ ]
[ ]
[ ] LIST of STRING a = {"aaa", "bbb"}
[ ] INTEGER b = 1
[ ]
[ ] print(SuperTypeOf(a))
[ ] print(SuperTypeOf(b))
[ ]
[ ]
[-] STRING SuperTypeOf(ANYTYPE theVariable)
[ ]
[ ] STRING theType = [STRING]TypeOf(theVariable)
[ ]
[ ] // Convert to lower case for ease of use with StrPos()
[ ] theType = lower(theType)
[ ]
[ ] // Check if it's a list
[-] if(StrPos("list of", theType) > 0)
[ ]
[ ] // remove the part that says "list of " so you are left with the base type
[ ] theType = StrTran(theType, "list of ", "")
[ ]
[ ] return(theType)
[ ]
[-] else
[ ] // it's not a list so just return the type
[ ] return(theType)
[ ]