working on nil pointer checking for tail node in linked list