Why can’t I narrow types using optional chaining of properties in typescript? Why can’t I use optional chaining to test this?