Updating case study getNode from class SinglyLinkedList.