closes #2: ifexists now considers empty collection as missing value.