Added check before storing SRS as EPSG, to make sure it can be decoded later

fixes #274