fix: should raise error if the arguments is invalid.