HelixToolkit.Wpf.SharpDX: Check bHasInstances effect variable existence.

bHasInstances field is initialized in the Attach method. However, it can not found. The variable will be null.

    public override void Attach(IRenderHost host)
    {
        // ...

        /// --- init instances buffer            
        this.hasInstances = (this.Instances != null) && (this.Instances.Any());
        this.bHasInstances = this.effect.GetVariableByName("bHasInstances").AsScalar(); // <-
        if (this.hasInstances)
        {
            this.instanceBuffer = Buffer.Create(this.Device, this.instanceArray, new BufferDescription(Matrix.SizeInBytes * this.instanceArray.Length, ResourceUsage.Dynamic, BindFlags.VertexBuffer, CpuAccessFlags.Write, ResourceOptionFlags.None, 0));
        }
        
        // ...

Need to check it in the Render method.