fix a bug that SmartArgs class throws an exception when a key is optional and doesn't have default value.