Added check to preserve 1/0 numerics. Bool test would naturally convert 1/0 to true/false, which may not be desired in some cases.