Updated views.py - exception for when cart is None