The problem is not the state.gd script and it doesn't have to be attached to any node. It serves as an interface for the actual implementation of your states (Idle, Air, Run, etc.)
That script probably has a line that says: class_name State and your states scripts probably inherit from that with extends State or something similar.
Your problem here is the error in line 11. It basically means that nothing is assigned to the state variable or more specific that it can't find name in nothing.
The statevariable gets initialized as the initial_statevariable. So that one is probably not set yet.
Did you set any state in the inspector for the export variable initial_state?