var rename to match actual jenkins vocab
fixing test and handling nil