Is there any other way to check this? I generally cringe at `typeof` checks. I guess the other option would be try/catch or something.