Use regex to avoid displaying split-second null

As suggested by @SAPlayer.