check if process with pid exists