Removing unnecessary `typeof` operators