The answer to the tile is
[ -e /dev/mapper/dev0 ]
you have tried. test -e /dev/mapper/dev0
is exactly equivalent. What do you mean by "that didn't seem to work"?