check if value already exists in array ReactJS