I was able to suppress the error message by adding:
if($shipping == null) $shipping =”;
to line 511 in the cart-item.class.php just before the function call . But this did not fix the problem as Paypal still returns the error:
Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address.