Can you please document this method? It doesn't need to mention the obvious, but explaining how the parameters are used (and in what circumstances the return value could be `nil`) would be useful.

As a sidenote, we prefer [TomDoc](http://tomdoc.org) style for header documentation.