Added exception handling to the accessors