Check size of price array before fetching element

A null pointer exception was possible if previous values existed but no value for min/max price was saved.  This checks that the element exists for trying to get it.