Improved test for type coercion functions