Added check for tagName property