Add singular checking function for double-linked list