Added null check for _updateRecordCacheForType