simpler type check