Drop ctype dependency.

Instead just cast and compare. No need to involve
locations and extensions.