argument validation and error propagation