check if a linked list is a palinfrome