Avoid calling getElementChecksum if not needed

If there's no checksum in serialized, there's no need to call getElementChecksum(rootNode).
Also, getElementChecksum(rootNode) is called once more if there is checksum in serialized.