Cleaned up if/else in ValueFormatter