config.steer or steerStep are booleans and need to be numbers.
At some point in time, steerSpeed == config.steer*steerStep. In this case, your first comparison case will be false, but your second will be false as well. This makes steerSpeed become a boolean (false) instead of a number. If you’re constantly updating steerSpeed, this makes the next update cause the error because steerSpeed is now a boolean. If this is happening then you should consider changing your code to allow for the case when steerSpeed is equal to the comparison
In either case, it might be simpler just to break up steerSpeed into a multi-line if statement.