Added: Type check for if