Added missing type check