fixed handling of nullable relation when no item has been selected