Move checking if variable exists at generation stage.