fixing is_constant for ints and floats