Apparently this didn't work cross-browser. Now checking for length/tagName instead.