More informative error handling in price extraction function