Collapse if/else on just check for readOnly?