Although I found if for events to be recommended in Windows programming, especially games in Direct X, it makes no sense since it can only process one event per frame.
If you were using an if and a while (you say that you use an if just for keys) then the while would be wiping the queue.
It seems best practice to poll and process the entire event queue in one go - once per frame.