fixing serialize item when attribute is null