Lua doesn't have a normal "in" operator, so you set up tables in a particular way:
t = {[3517]=1;[-7502]=2;[8559931]=3}
If you imagine the numbers in the brackets as GUID values, this makes it easy to find one.
x = some GUID value
if t[x] then ...
A non-nil value indicates that name has some value, and if you use that value you could do something like this:
So, in this example, if x was -7502 then v would be 2.