[libcontacts] Test strings for emptiness rather than null

When resolving addresses, there is no significance in the difference
between empty UID and null UID; correct the tests to remove the
possibility of caller error.