I'm writing a tool and essentially I found out that arcmap defaults an epsg to 0 if it sees that the projection is not supported against the predefined projections.
You should try to use the following code and see what happens using a not supported EPSG code:
sr = arcpy.SpatialReference() sr.factoryCode = 123 sr.create()
May be you can check any property of the
sr object to see if the given EPSG code
123 was valid. May be the
create() method raises an exception. Have a try :-)