Use NULL instead of nil for error pointer parameter

Keeping with the style.