Family type custom node input glitch

I made a Dynamo graph. The graph works fine until I made it as a custom node. It seems the problem is related to the Family Types node and the input node but I couldn’t figure out what the problem is.