Use not instead of direct compare to none.

Change-Id: I68c1c681a333e3eb5d128f69cb5aebc46213cb07