Add guard to window constructor. Empty ranges now provoke an error