Add some better error checks to interval construction.

[SVN r86779]