Avoid comparing nil with int