Properly handle empty process history ID