Input type documentation of older MediaWiki methods often does not match reality, which can result in breakage (T200456: MapCacheLRU::has called with invalid key. Must be string or integer. is an example). Newer code often uses wikimedia/assert to ensure correct input, but in older code that would cause breakage just the same.
We could add a "soft" version of assertions which logs invalid input but does not throw, add such assertions to common MediaWiki core classes, and use them to bring the parameter type documentation in sync with reality.