MAINT: Factor out check for window length value sanity.

Preparing for BatchTransform not using EventWindow, so
factoring out the checks for window length into a
function that can be shared.