Delete empty values from dictionary in place

Sorry, there was a indentation error in previous pull request. Now it should pass tests.