Your interpretation is probably correct, but as Sam says, this is just a common thing that people say. You should not think too deeply. It is more common for certain people/regions.
For example, the Irish often say "well, if it isn't yourself!" when meeting someone. (If you google this phrase, it will give you many Irish novels). If you think about it deeply, it's a bit stupid. No-one would ever answer "no, it's not me"
It can also be expressing (happy) surprise.
e.g. "So I'm standing in the supermarket queue, and you know who is standing behind me? If it isn't George Clooney!"