fix type checks for generic types
add type comparison expression

Closes #2.