CLOUDSTACK-2515: Verify if the targetPath isn't null before comparing