Moved the logic for product checking into a standalone method