fix crash when trying to validate comments or PIs instead of elements
changelog