Added support for empty lists and objects