i took this from xml\json test
but you right - this is stupid check