This function is used for checking the stock availability.