add check before index parsing strings