Avoid getting permission denied for isInteger method

Change-Id: I5b1f90668c99b0f1276ba75fd1dc93d26aa227e5
Related-Prod: PROD-26217 (PROD:26217)
diff --git a/upgrade-mcp-release.groovy b/upgrade-mcp-release.groovy
index 5bc0ab2..b7c0468 100644
--- a/upgrade-mcp-release.groovy
+++ b/upgrade-mcp-release.groovy
@@ -89,8 +89,12 @@
     }
 }
 
-if (common.validInputParam('PIPELINE_TIMEOUT') && env.PIPELINE_TIMEOUT.isInteger()) {
-    pipelineTimeout = env.PIPELINE_TIMEOUT.toInteger()
+if (common.validInputParam('PIPELINE_TIMEOUT')) {
+    try {
+        pipelineTimeout = env.PIPELINE_TIMEOUT.toInteger()
+    } catch(Exception e) {
+        common.warningMsg("Provided PIPELINE_TIMEOUT parameter has invalid value: ${env.PIPELINE_TIMEOUT} - should be interger")
+    }
 }
 
 timeout(time: pipelineTimeout, unit: 'HOURS') {