Simplify tests to check first whether the returned list from datomic is empty or not