You need to surround this with an `if (obj instanceof EPSGTuple)`, otherwise you might get casting errors.