list: Check pointers with ASSERT_VALID_PTR() rather than just ASSERT()