This will remove problem with passing empty array and empty hash. Unfortunately it will not remove problem with array with nil inside.

The bigger problem is that for every situation where you would like to disallow nil in array there is another situation where nil is perfectly valid value and should be allowed. Unfortunately this is application-specific problem and should be handled differently in every situation. We might want to introduce another method that will munge params, but definitely it should not be on by default(ask all API-based applications that were broken yesterday why).

That's why I believe we should abandon this solution, do revert(as in #8870) and try to find easy to understand(and apply) method that will be optional instead of default.