simple type checker