Grasshopper Diagrid Structure Error

Hi guys, I am a beginner in grasshopper. I am just trying to create diagrid structure to the loft surface, but I keep getting the error message:

  1. Invalid cast: Surface » Surface
  2. Solution exception:Object reference not set to an instance of an object.

I have tried connecting the loft to deconstructed brep and connect to diagrid structure, but still getting the same error. Anyone can help me with this please?

Uploading relevant files will increase your chance to get an answer.
Help Us Help You - Grasshopper - McNeel Forum