Fix issue in PGM with high frequency

The issue was that the process buffer can be called with null as data, however the method tried to access the parameter before checking the value