Needed to check if the cli was defined not just exists since its a weaken ref.