Improve argument check