updated addtab validation

needs fix in checking for availability of tab in the database