checks if the variable is set, removes the php notice on front end