add wrapper for setvalue to help catch bad objects when using persistence