Check the validity of file/object paths