I think the best thing for you could be the if - command from livinfree, so just some comments in addition:
man test - would bring you the expressions you can use with if
-e ... file exists
-f ... file is a regular file
-d ... file is a directory
-h ... symbolic link
-b ... block device
-c ... character device