Wonderfulizing isSameType

Review by @adriaanm.