[BUGFIX] Refactoring CheckPid ViewHelper

This fixes a regression which was introduced by #57491

Resolves: #57517
Change-Id: I3c75a73860f541616572c13ce4e1724555c31472