Null check was the wrong way