`warning` isn't accessible from outside of the React code, so it's probably better to keep the `if` and just do a console.warn.