sqlalchemy: fix mysql primary key creation

* Fix checking of Text type supporting the case of NullType column type.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>