[LANG-688] removed unnecessary elses and use of ternary operator with primitive boolean consequences e.g. (some boolean expression) ? true : false