Use pre-condition instead of assert