Get the type of a variable