Nil Instead of Empty String

They are defined. The schema is generated in migration for mysql5.
It's just that when the field is empty it returns nil instead of an
empty string. When there are values in the field it works fine, but
when it returns nil it generates an error.

Let's make it clear: is the field NULL in database, or is it indeed empty?
These are not the same.