Perhaps name this `hasScrollbar()` to make it clear that it's side-effect-free and returns a boolean?