Optimize Profiler check on DebugHandlerPass.php

Correct and Optimize Profiler check !!