Bug 877500 - Add a null check so that CFRelease() doesn't crash. r=joshmoz