#96703Fix definition availability checks in DI compiler passes
Description
findDefinition() doesn’t actually return a boolean (or null)
value on failure but throws an exception instead. As an alternative
$container->hasDefintion may be used to check for definition availability.