Type check arguments to maplike/setlike methods.