refacotr argument validation