check if a linked list has circle