Added custom error for ArgumentError