Check for duplicate or empty headings