We already do this in many places, but there were also still plenty
of getOption(, false) calls. Change these to hasOption() for consistency.
Change-Id: I74f91a5bf5a8036496ab1f493e5862a04d27ec0f
This has been in Wikibase since 2012, but is not at all
specific to Wikibase, and doesn't even require Wikibase
to be enabled.
Having this in core will make it available to more people
and without the hassle of having to clone Wikibase to
use the script.
Bug: T114577
Change-Id: Ib521a65e616bdc4b81206a084289cb4750f0d1f5