Added isSameTypeAs method