Added deleteEmptyProperties function to stop custom unstructured event JSONs from including empty fields