Check serviceInfo->cache is not NULL to avoid accessing to null pointer.