Only check record if it's actually non-nil.