function parsePrice(currency, price) {
  if (!currency || !price) {
    return null;
  }

  if (currency.length === 0 || price.length === 0) {
    return null;
  }

  return {
    currency,
    amount: parseFloat(price),
  };
}
Parse separated currency and price into a price object
if both are valid and non-null.

@param {string} currency The currency of the book price.
@param {string} price The price of the book.
@returns The price object.