Adding a checking if a parameter is null
Adding a checking if a parameter is null

Somehow perf event still delivers a signal even when the app closes
improperly (seg fault for instance). In this case, we need to avoid to
continue to read the buffer.
HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit