nitpick: this should be `if speed is not None:`