Fix checking quantity of certain size of product

Return 0 instead of nil