Hackiest type checking ever.