Empty value should not create a new entity from a reference field.

Sometimes a client may send a NULL value, but it is somehow translated to an empty string.
Following check makes sure with are returning a NULL value in that case.