Fix textalign name typo. Thanks to Poil
Check when this.gdes[i].legend is null