add missing type guards

Although we're gonna replace this file soon. =3