Fix passing NULL as param for NSError.