Get material from GetMaterialFromCollisionFaceIndex

I’m obtaining the material that corresponds with the face hit by a LineTrace using the node GetMaterialFromCollisionFaceIndex. This node is very useful but as a result of the call I’m getting a Material Interface Object Reference… how could I convert this type to a normal material and verify if it is equal to another material?

What I’m trying to do is to trace a line through an object and verify if the line is hitting a specific material (I prefer not to use a psx material and the node described above since to be perfect for what I’m looking for)

I think I’ve found a quick solution. Actually a simple Cast To Material Instance seems to work without any issue.