Remove null whilst serialising objects to json