Fix attribute validation when allowNull is default

When allowNull is not set for a model's column, treat the default value as true. Also treat primaryKey attribute as allowNull = false.