Check that the target is a heading, or at least has a data-level attribute first, and die() if the checks fail, like "Targeted element isn't a heading" or something.