check for nodeType, which will catch dom objects