added checks for new doctypes