Correctly handles optional line items