The error return is not documented. We are definitely moving to a "don't check params for NULL". I would like to see this changed to be the obvious one-liner. Tim will disagree, but he's on the wrong side of history :)