Added The illegal arguments and state checks