[libcontacts] Do not search for empty values

If we search for values without first testing that they are valid, we will match any invalid data items that have been created.