Well, it will "work" in cases where a script checks if x is empty when there is a possibility that x is nil, when x is not operated on if empty? is true, and when the script still functions whether x is nil or not. However, for many scripts on which this could potentially operate, those conditions won't be satisfied, and this "fix" won't simply hide error messages, it will prevent code from running that has to run in order for the script to function. In the result, the script will behave unexpectedly without telling you why, and that's really, really bad. To be sure, the project would crash without this "fix", but with this "fix" any scripter who is looking to diagnose the errors in his or her logic will be at a serious disadvantage.
As a scripter, I would never want something that suppresses error messages, since error messages disclose failures in my logic that should be corrected, not ignored. In other words, error messages disclose errors, but they aren't themselves errors, and they don't need to be "fixed".
That said, I can understand why some non-scripters might want something like this for situations where the logical error is otherwise harmless, but I will caution that if you ever encounter any errors or lack of function in any other script you use, delete this "fix" before asking a scripter for help. In general, I think you're better off to ask for help with a script that's throwing errors, and not to just put this code in and hope it's a situation where the actual error in the script is otherwise harmless.
Still, thank you for sharing.