<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def modify_column_if_table_exists(self, tablename: str, fieldname: str, newdef: str) -> Optional[int]: """Alters a column's definition without renaming it."""

        if not self.table_exists(tablename):
            return None
        sql = "ALTER TABLE {t} MODIFY COLUMN {field} {newdef}".format(
            t=tablename,
            field=fieldname,
            newdef=newdef
        )
        log.info(sql)
        return self.db_exec_literal(sql)