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: I78557fbdc979ee444d6f96e11a769f3ec8513ac3