To make the posterior call to strtol() completely correct, this should check if stech is an empty string:

if (stech && *stech != '\0')