Use the term "writable" in the code as a shortcut for "there is an active item and it is not locked".