Expand abnormally used ternary operator to if

IMO constructs like these should be avoided for better clarity.