`prepare_ufunc_output` could check but it doesn't really know what to do with the NULL.
I think the check should be done after the allocation and the function aborted as soon as possible and not hope that someone else will take care of it.