Need to check for existence of parent before using its 'vars'

Need to check if the parent form exists before trying to use its vars.