Add resource ordering for jenkins.client state

Change-Id: Iaba55d38b53644fa66081b26dc4938e8313ed91a
Related-task: #PROD-21892 (PROD:21892)
diff --git a/_states/jenkins_artifactory.py b/_states/jenkins_artifactory.py
index d88b84a..91dc408 100644
--- a/_states/jenkins_artifactory.py
+++ b/_states/jenkins_artifactory.py
@@ -43,7 +43,7 @@
 delete_artifactory_groovy = u"""\
 def inst = Jenkins.getInstance()
 def desc = inst.getDescriptor("org.jfrog.hudson.ArtifactoryBuilder")
-if(desc.getArtifactoryServers().removeIf{it -> it.name.equals("${name}")}){
+if(desc && desc.getArtifactoryServers().removeIf{it -> it.name.equals("${name}")}){
     print("REMOVED")
 }else{
     print("NOT PRESENT")