Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor::addCategoryFilter() must be an instance of Magento\Catalog\Model\Category, null given, called in /var/www/html/app/code/Mgroup/Custom/Helper/Data.php on line 101 and defined in /var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Collection/Interceptor.php:241 Stack trace: #0 /var/www/html/app/code/Mgroup/Custom/Helper/Data.php(101): Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor->addCategoryFilter(NULL) #1 /var/www/html/app/design/frontend/bluesky/bluesky_default/Magento_Catalog/templates/product/list/items.phtml(45): Mgroup\Custom\Helper\Data->getProductCollection() #2 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/html/a...') #3 /var/www/html/vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\ProductList\Related\Interceptor), in /var/www/html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Collection/Interceptor.php on line 241