safer operation when converting raw to sqlalchemy