 Solution: add check for `null` and `undefined` in the second ("objects") row: `(input !== null && input !== undefined) && [...]`