Fix issue in DefinitionTask : check was still relying on old syntax
Add safeguard in InstrTask check to avoid raising a key error when a profile is not in the runtimes.