Cannot read property 'startsWith' of undefined