Added fix for the null issue in getProducts