Fixed the existing type check