code: def _nan_argminmax_object(func, fill_value, value, axis=None, **kwargs):
      
      valid_count = count(value, axis=axis)
      value = fillna(value, fill_value)
      data = _dask_or_eager_func(func)(value, axis=axis, **kwargs)
  
      # TODO This will evaluate dask arrays and might be costly.
      if (valid_count == 0).any():
          raise ValueError('All-NaN slice encountered')
  
      return data
docs: In house nanargmin, nanargmax for object arrays. Always return integer
      type