if (value == null) {
toReturn = NullValueCommand.INSTANCE;
} else if (type.isPrimitive()) {
if (type == boolean.class) {
toReturn = new BooleanValueCommand((Boolean) value);
} else if (type == void.class) {
toReturn = NullValueCommand.INSTANCE;
} else if (type == long.class) {
toReturn = new LongValueCommand((Long) value);
} else if (type == char.class) {