The issue you are facing is really not related to the others things said here.
It seems like the graph tries to access those variables BEFORE you have filled them in through code. Can you please confirm that you fill the variable through code BEFORE the graph attempts to access those variables in question?
Thank you.