telemetry: fix error checking for strchr function