This logic is duplicated (and kind-of duplicated) in a lot of places. What if you had some methods on Cart:

```ruby
class Cart
  def self.find_by_cookie(cart_id_from_cookie)
    if cart_id_from_cookie
      Cart.find(cart_id_from_cookie)
    else
      NullCart.new
    end
end
```

Then you can do `Cart.find_by_cookie(cookies.signed[:cart_id])` here and elsewhere. I'd also define `Cart.find_or_create_from_cookie` for when you want to create a new card instead of just returning a `NullCart`.