If you are building a generic library, then I would recommend using defaults for missing data and document the behaviour. Like 0 for numerical, false for boolean, empty string (wouldn’t recommend null here).
And if you want to externalise the decision on how to handle missing data, create an...