_buildType method and tests