don't stringify functions; guard against recursive objects