Changed valuetype comparison as per xt0rted's suggestion