Fix type error and add test on sqltypes.py.