A little bit more error checking never hurt anyone, did it?