isKey function

Check if a variable qualifies as a key