Simple guard against pid not existing.
Merge pull request #6708 from robertkeizer/ps_top_guard

Simple guard against pid not existing.