Do not compare nil and true. Fixes #7996. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/91470043