added assert to duck typing function test