refactor: cleanup nullish values handling