made isNotEditable a generic function