title: Jenkins file, check if Globals variable exists
body: <p>I have jenkinsfile with defined Globals varible for timeout</p>
  
  <pre><code>class Globals {
      static String TEST_TIMEOUT = ""
  }
  </code></pre>
  
  <p>I am using functions from shared library
  I am using the global variable to set a timeout for function. Since the shared library used by other projects that doesn't define the Globals variable I defined environment variable in the function file to be used as default value for time out.</p>
  
  <pre><code>env.TESTS_TIME_OUT="10080"
  </code></pre>
  
  <p>Then in function I want to check if Globals variable exists, I want to use the value as time out, if not the to use the default value.</p>
  
  <pre><code>if(Globals.TEST_TIMEOUT){
     env.TESTS_TIME_OUT= "${Globals.TEST_TIMEOUT}"   
  }
  timeout(time: "${env.TESTS_TIME_OUT}", unit: 'MINUTES') {
  .
  .
  .
  }
  </code></pre>
  
  <p>I`ve done it before with success on env parameters, but this time I am getting an error</p>
  
  <pre><code>No such field found: field java.lang.Class TEST_TIMEOUT 
  </code></pre>
  
  <p>Any ideas how to solve this ? Or Any other way to check if Globals variable exists ?</p>
  
  <p>Thank you</p>