Fix null reference in theme dir resolve