Add nil check to Cons slicing