fixed nullable/required check on db columns