/**
* Type is passed in to handle primitive types.
*/
protected ValueCommand makeValue(Class<?> type, Object value)
throws SerializationException {
SerializeFunction customSerializer;
ValueCommand toReturn;
if (value == null) {
toReturn = NullValueCommand.INSTANCE;
} else if (type.isPrimitive()) {