The other day I needed to determine the type of an element returned from a jQuery search. It's done through the prop() function and it returns an upper case string:

var element = $(this);
if (element.prop('tagName') == 'TD') {
     // do something
}