Fixed so empty objects are not initialized but are returned as null instead.