Fix for possible NULL cart id