Added checks if name is really a string

If there something else than a string was provided, then router was
segfauliting. Now there's a check and other names than strings won't be
taken into consideration at all.

Corrected names of variables from camelCase to understores.