Use !empty() to check wmf config vars, in case they are undefined

From https://gerrit.wikimedia.org/r/#/c/141268