Check if NSDataDetector object was successfully allocated before caching it