Maybe add an assert at the top that verifies that `!(events == NULL && err == 0)`?