Fix the handling of the null/negative values with the LONGTEXT settings.
Add more corner case tests.