fix tests and impl for null/undefined values