Improve code for setting bot param, with isset check as added in Ie0650eb

cherry-pick

Change-Id: I8321ed4249e8d993adf1ea1724e45af1d16c9803
Merge "Improve code for setting bot param, with isset check as added in Ie0650eb" into mw1.23-wmf19