Class of folder

I am having a brain freeze …

How do return the “folder” class instead of “alias”?

set xxx to alias "Mac OS X:Users:John:Desktop:testFolder:"
tell application "Finder" to get class of xxx

set xxx to alias ((path to desktop as text) & "testFolder:")
tell application "Finder" to get class of item (xxx as text)

Thanks Stefan.

Why do you have to include item?

Now you get the class of an item from a disk, otherwise the class is just the variable, which is an alias. The parentheses and as text coercion is not needed per se (on my machine) you need to add item.