Do not perform instruction in assert

  They are skipped in release mode.
Add braces around else condition.