Tried to use invalid object (Type PANEL) error

I am trying to make an addon where you would write something and it would record the input and save it to a text file aswell as your name. Then it would create a table onto a DListView but I have came across a new error and would like your guys input.
This is the error:


[ULib] lua/autorun/client/submissions.lua:86: Tried to use invalid object (type Panel) (Object was NULL or not of the right type)
  1. SetVisible - [C]:-1
   2. fn - lua/autorun/client/submissions.lua:86
    3. unknown - lua/ulib/shared/hook.lua:110

This is the line of code:


df:SetVisible(true)

EDIT: Seems to be everytime I edit the file and it refreshes?