def.validType and tests