Well I think, this mathematician obviously was right.

If spheres and cubes would only exist in his mind, then he could not talk about their properties and be understood by other mathematicians. Thus spheres and cubes must have some objective reality.

This has of course nothing to do with a certain mathematician believing in some God, Allah, Buddha or whatever. Not only mathematicians but people generally are strange guys sometimes believing in strange things smile. BTW belief in some gods is not strange but is perfectly normal, this belief developed ten thousands of years ago during human evolution, and is still in our genes.