Clean up the if.nils?

Intended to update rapid7#1473