#5 add check of non-element nodes