Removed the NullException Class and throwing runtime_errors instead. Implemented check on RS and RD to ensure they are within Range