replace file system check with WF check

Instead of casting to a `(bool)` it might be better to check `!empty` or `!is_array` depending on the return values of `getCityIDsFromVarValue`.