accepting custom int types when converting with AsInt