Fixed wrong unequality (if defaultValue is 0 don't work.

Added check to avoid null values if field is mandatory (aka NOT NULL on db).