def isnull(self):

        ret = self._codes == -1

        # String/object and float categories can hold np.nan
        if self.categories.dtype.kind in ['S', 'O', 'f']:
            if np.nan in self.categories:
                nan_pos = np.where(isnull(self.categories))[0]
                # we only have one NA in categories
                ret = np.logical_or(ret, self._codes == nan_pos)
        return ret
https://github.com/dimagi/commcare/wiki/CaseAttachmentAPI
dataset/ETHPy150Open pydata/pandas/pandas/core/categorical.py/Categorical.isnull--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/api/object_fetch_api.py/CaseAttachmentAPI.get