if x%TEST% == x echo empty string
In this example, the variable TEST is added with a value x and checking whether the concatenation of x and TEST is still x or not. If its still x which means TEST didn't have any value in it. Otherwise it had a value.
Simple, isn't it?