Refactor the isActive and isProductActive