Moved error tests for Variable to separate script