Fixed null deref by adding null check.
Fixed null deref by adding null check.

If factory methods weren't "auto-initialized", a null dereference
would occur in this codepath.

Change-Id: Ic5298701844be1f252a92871031a2ede93059dfa

gram526/VTK,keithroe/vtkoptix,msmolens/VTK,keithroe/vtkoptix,sumedhasingla/VTK,jmerkow/VTK,hendradarwin/VTK,SimVascular/VTK,SimVascular/VTK,gram526/VTK,biddisco/VTK,demarle/VTK,johnkit/vtk-dev,msmolens/VTK,collects/VTK,sumedhasingla/VTK,berendkleinhaneveld/VTK,sankhesh/VTK,hendradarwin/VTK,SimVascular/VTK,gram526/VTK,candy7393/VTK,keithroe/vtkoptix,berendkleinhaneveld/VTK,mspark93/VTK,johnkit/vtk-dev,keithroe/vtkoptix,biddisco/VTK,candy7393/VTK,sankhesh/VTK,berendkleinhaneveld/VTK,berendkleinhaneveld/VTK,mspark93/VTK,SimVascular/VTK,SimVascular/VTK,berendkleinhaneveld/VTK,demarle/VTK,mspark93/VTK,hendradarwin/VTK,msmolens/VTK,msmolens/VTK,demarle/VTK,SimVascular/VTK,candy7393/VTK,ashray/VTK-EVM,keithroe/vtkoptix,keithroe/vtkoptix,mspark93/VTK,gram526/VTK,jmerkow/VTK,collects/VTK,SimVascular/VTK,SimVascular/VTK,jmerkow/VTK,demarle/VTK,candy7393/VTK,ashray/VTK-EVM,collects/VTK,candy7393/VTK,ashray/VTK-EVM,johnkit/vtk-dev,johnkit/vtk-dev,mspark93/VTK,ashray/VTK-EVM,hendradarwin/VTK,gram526/VTK,johnkit/vtk-dev,demarle/VTK,ashray/VTK-EVM,sumedhasingla/VTK,biddisco/VTK,collects/VTK,sumedhasingla/VTK,gram526/VTK,demarle/VTK,candy7393/VTK,msmolens/VTK,sankhesh/VTK,keithroe/vtkoptix,ashray/VTK-EVM,sankhesh/VTK,collects/VTK,hendradarwin/VTK,sumedhasingla/VTK,jmerkow/VTK,biddisco/VTK,biddisco/VTK,ashray/VTK-EVM,johnkit/vtk-dev,jmerkow/VTK,ashray/VTK-EVM,hendradarwin/VTK,msmolens/VTK,berendkleinhaneveld/VTK,berendkleinhaneveld/VTK,candy7393/VTK,jmerkow/VTK,sankhesh/VTK,msmolens/VTK,johnkit/vtk-dev,gram526/VTK,biddisco/VTK,jmerkow/VTK,demarle/VTK,keithroe/vtkoptix,sankhesh/VTK,gram526/VTK,candy7393/VTK,sumedhasingla/VTK,hendradarwin/VTK,mspark93/VTK,sumedhasingla/VTK,sankhesh/VTK,sankhesh/VTK,jmerkow/VTK,demarle/VTK,collects/VTK,mspark93/VTK,msmolens/VTK,mspark93/VTK,sumedhasingla/VTK,biddisco/VTK