Added check for variant stockrecord

Missing the check causes the is_available_to_buy method to return
false when a variant has no stock record, even when other variants have
stock.

This makes a product unpurchasable even though it may have stock for other variants.