Check if data exits on tabs to avoid javascript error