Use cart directly instead of setting up intermediate variables
Added a condition for undefined mailing address because these functions seem to be getting called before the retrieve finishes