I'd make this private rather than part of a public API. If we want it to be called by other things, it should be moved to an appropriate utility place (and perhaps renamed to make it clearer that it will return null if not positive).