Adding a check to see if cart was found before trying to alter it