if number is null then set to infinity else set to to number