Handle anonymous objects correctly