How to reference existing term if it exists or create new one if not exist via Inline Entity Form module? I have a content type book and it has a taxonomy term reference field: author.

I want to enter name and surname separately for each author on node add/edit page. Name and surname together will be the taxonomy term.

If I enter John for the name and Smith for the surname the taxonomy term will be John Smith.



I'm doing this by using the Inline Entity Form module with the Automatic Entity Label module.

The problem here is: the Inline Entity Form has two options while entering the term:


Add new term
Add existing term.




If you don't know if the term exists or not it become useless.

What I need is only one option and if the entered [name + surname] exist then select it as author automatically and if that not exist create a new term.


How can I do this?

(Similar structure can be created with some different methods such as References Dialog module, Entity Connect module etc but the main problem exist there too.)



Note: This question is not a duplicate of "How to create a name-surname structure for taxonomy terms?" ... even though they use the same image. In this question the main point is "how to combine creating new term and choosing existing one options", in the other question "how to create a name-surname structure on node form" is asked.
This solution is a bit "out there" so I'll just describe the logic. 


Three taxonomy fields. One for first name, one for last name (so there's autocomplete), one for full name generated by rules.
On node save, join the first+last as tokens and fetch term by property name. This will give a list containing one or no terms.
Two rules components that receive the list.
No. 1: condition, list is empty. Actions. Create term and send it back to the rule.
No. 2: condition, list is not empty. Actions. Send back the fetched term. 
In the main rule, set data value on node, returned terms. 


It's "out there" but that's because there are two fields for one term.