check if tags is undefined