Made function isWritable simpler

- no need in return;
- no need to call done in 3 places;
- instead of true/false variable `result` was added.