Use $.isFunction method for checking existence of onTabSelect option