Fixes UDF regression related to handling of `*Val is None`