Simple conditional to check whether a given variable is a table (as opposed to a string or integer) in LUA
if (type(elem) == "table") then print("Is a table") else print("Is not a table") end