CAMEL-7785: Fixed potential NPE.