Raise ShippingError on nil in get_max_weight

See issue #164.