add valueof method for ShardingKey