Detect whether element has children.