The default value (which is null by default) will only be inserted if you don't supply any value for the column in an insert statement.
So to handle this you need to check that the values are valid before inserting and return an error.
This seems to be yet another Mysql design mistake. It should not be possible to insert invalid values.