Typescript String Match Object Is Possibly Null Typescript W3schools