TypeError: Cannot read property 'startsWith' of null