Prevent comparison of number with nil