Exit when api not initialised to prevent exceptions.