A middleware that removes all empty strings, hashes, arrays and nil values from a json input