make existence check more idiomatic