A JSON notation {} represents an empty object, meaning an object without members. This is not the same as null. Neither it is string as you are trying to compare it with string "{}".
I don't know which json library are you using, but try to look for method something like: