You can move this test + transformation in caller side and avoid the copy/paste in other place