renamed allowNull to nullValid