Element::directionality()
This fixes a crash that occurred when determining the directionality of input elements.