Check line_items key exist before mapping (api)

Sometimes we might want update only an order attribute, e.g. email, and
not the line items. In that case users would get an error response so we
better check if the key exist