Making the datatype parameter optional makes it useless.
If it's optional, your "generic tool" must be able to handle
data both with and without it, meaning that you have to handle
the special case of no datatype, so why would you bother to do
anything with the type except to check it?
I must have misunderstood.....
Harald A