checks for self-closing tags