protected Variable createVariable(String key, Object value) {
Variable variable = null;
if (value==null) {
log.finest("creating null variable for "+key);
variable = new NullVariable();
} else {
Environment environment = Environment.getCurrent();
if (environment!=null) {
VariableTypeResolver variableTypeResolver = environment.get(VariableTypeResolver.class);