Check properly for None in the headless compositor case