add more convenient type checking