Ensure a variable is initialised before trying to use it