assertVariableExists function

Assert a variable exists in the model