Using assert() instead of if()