fixed unit test, by handling null case when reading Anchors