added null check to renderer