Fixed NoMethodError StandardError bug #142

Fixed NoMethodError StandardError bug #142, added specs, changed throw of StandardError to ArgumentError since its actually an error on the argument.