Does hasChildNodes() return anything other than a boolean? If not, we can just skip the == TRUE part.