If the link is marked deleted, the nodes would have been cleared. So, there can
be cases where the link will not have any nodes i.e. we should check if the
link has valid pointers to nodes or not before accessing the nodes.

Change-Id: I2ea558fc96ae9d3e20254c1f239e76c1fcbd68c1
Merge "If the link is marked deleted, the nodes would have been cleared. So, there can be cases where the link will not have any nodes i.e. we should check if the link has valid pointers to nodes or not before accessing the nodes."