sqlalchemy: fix mysql primary key creation

* Fixes checking of Text type supporting the case of NullType column type.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>