Fixed so that value types can be read and written correctly

Since value types can never be null, the conditional that checks to see if a type converted value is null only needs to be added to the delegate if the type is a class. Also removed the where T: class constraints from everywhere.