Added types to findPid helpers.