Typescript Find Element In Array Python Questions For If Statement