improved more on checking passed parameter types in 'send' function