Thanks for the code-review, it's very much appreciated :) I believe the function will not actually fail in the case of an invalid parameter, but it probably should. It might make more sense to throw instead.

Assuming $.extend is working correctly, it should end up as an empty object in the invalid argument case, and carry on just fine afterwards.