CLOUDIFY-2346 added verification to avoid NPE.