Getting current tid on taxomony/term/{id} without using arg()
From where this page is coming, from core taxonomy or views?.

By default the taxonomy module provide the taxonomy/term/## callback and views module also provide a default view with the path taxonomy/term/##.

If you haven't enabled the Taxonomy term view then this page will be the default taxonomy core page, in that case you can use menu_get_object('taxonomy_term', 2) to get the loaded term.

For arg(), the document says 


  Avoid use of this function where possible, as resulting code is hard to read. In menu callback functions, attempt to use named arguments. See the explanation in menu.inc for how to construct callbacks that take arguments. When attempting to use this function to load an element from the current path, e.g. loading the node on a node page, use menu_get_object() instead.