Polymorphic function type testing