title: Cannot invoke method getNodeName() on null object
body: <p>I am executing simple groovy script using scriptler jenkins plugin.</p>
  
  <pre><code>import hudson.model.Computer
  import hudson.model.Node
  
  println Computer.currentComputer().getNodeName()
  </code></pre>
  
  <p>If I execute this on master or any slave, giving me NullPointerException</p>
  
  <pre><code>java.lang.NullPointerException: Cannot invoke method getNodeName() on null object
          at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
          at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
          at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
  </code></pre>
  
  <p>Not sure what is wrong with script.</p>