MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
22P02 - ERROR: invalid input syntax for integer: "" LINE 2: SET firstpost='' WHERE tid='21797' ^
Query:
UPDATE mybb_threads SET firstpost='' WHERE tid='21797'