if the serial P is availibe then the if should work, otherwise not
It should. That it appears not to implies that the problem is not in the snippets you posted. You ignored my hint last time, that you should post all of your code. Do not ignore it again.
The problem is that you only supplied one of the two programs that are talking to each other.
You call check_serial() at the top of loop. It reads ONE character, if there is any. Then, you make decisions about what to do. Some of those decisions involve reading more serial data. We have no idea what the program sending the data is doing, but you seem to be under the impression that sending a 'P' causes that letter to be at the head of the queue, so the next call to check_serial() will get the 'P'. That may not be a valid assumption. Hard to say without seeing the Processing application, too.
The serial buffer? No, there is no way, without modifying the HardwareSerial class, to print what is in the buffer. You would need to read the data, and save it somewhere else.