Ability to handle NULL as an argument to batch over

Previously, `batched_fn(NULL)` resulted in an error, now it results in NULL.