Why not use `hasattr(value, 'imag')` as you do in `sanitize_scale()`?