Type II string theory and modularity