Added a check for mutability